Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Setting Java Environment PATH


Check if JDK/JRE is installed

Open Command Line Terminal (On Windows: [Start > Accessories > Command Prompt]) and type the following command:

java -version

Remember to leave a space between java and a dash. If the command displays the version of Java, you are good to go without Java installation. Otherwise, download it from http://www.oracle.com/technetwork/java/javase/downloads/index.html.

Install JDK/JRE

On Windows

Run the Java Installer and follow the instructions.

On Linux

Visit the following page to get the complete step-by-step explanation how to get JDK or JRE installed on Linux
http://www.oracle.com/technetwork/java/javase/install-linux-self-extracting-138783.html

Set Java Environment PATH

On Windows

Check if JAVA_HOME environment variable is set at [My Computer > System Properties > Advanced Tab > Environment Variables > System Variables Block]. If you do not see JAVA_HOME variable listed:

JAVA_HOME Environment Variable Configuration

Click on the New button to add a new variable. Enter JAVA_HOME as a Variable name and the Java installation PATH as a Variable value. Press OK button to save.

JAVA_HOME Environment Variable Configuration

In the same window find the existing PATH variable and edit it by adding the %JAVA_HOME%/bin; string at the end of the current value. Press OK button to save.

On Linux

  1. Navigate to your home directory.
  2. If you cannot see .bashrc file, it is hidden. Press Ctrl+H if you are in the Desktop environment.
  3. Open .bashrc file in the editor.
  4. Add the following lines at the end of the file.
    export JAVA_HOME=/home/user/bin/jdk1.5.0_09
    export PATH=$JAVA_HOME/bin:$PATH
    
    Do not forget to change the first line of the code to the actual PATH where you have installed your JAVA package.
comments powered by Disqus
Page info
viewed 4020 times
translations en
Author
posted 2 years ago by
CUBRID
Contributors
updated 2 years ago by
View revisions
Share this article