Skip to content

Instantly share code, notes, and snippets.

@wesleyit
Created September 25, 2014 13:27
Show Gist options
  • Save wesleyit/4adf35de90df959dffe6 to your computer and use it in GitHub Desktop.
Save wesleyit/4adf35de90df959dffe6 to your computer and use it in GitHub Desktop.
This script will export many useful environment variables related to Java SDK.
#!/bin/bash
# ##########################################################
# set_jdk_env.sh
# This script will export many useful environment variables
# related to Java SDK.
# Wesley Rodrigues da Silva <wesley.it at gmail.com>
# LICENCE CREATIVE COMMONS BY - 2014
# http://creativecommons.org/licenses/by/2.0/legalcode
# ##########################################################
## Where is your JDK folder?
export JDK_HOME="/opt/jdk8"
## Ok, don't change this
export SDK_HOME="$JDK_HOME"
export JAVA_HOME="$JDK_HOME"
export JAVA_ROOT="$JDK_HOME"
export JRE_HOME="$JDK_HOME/jre"
export JAVA_BINDIR="$JDK_HOME/bin"
export PATH="$JAVA_BINDIR:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment