Friday 6 September 2013

Java Environment Setup

This post guides you on, how to download and set up Java on your machine. Java SE is freely available from the link Download Java. So you can download a version based on your operating system. Follow the instructions, specified on the website to download java and install Java on your machine. Once you have installed Java on your machine, you would need to set environment variables to point to correct installation directories.

Setting up the path for windows 2000/XP/7/8:

Assuming you have installed Java in c:\java\jdk directory:
  • Right-click on 'My Computer' and select 'Properties'.
  • Click on the 'Environment variables' button under the 'Advanced' tab.
  • Now, alter the 'Path' variable so that it also contains the path to the Java executable. Example, if the path is currently set to 'C:\WINDOWS\SYSTEM32', then change your path to 'C:\WINDOWS\SYSTEM32;c:\java\jdk\bin'.
Setting up the path for windows 95/98/ME:

Assuming you have installed Java in c:\java\jdk directory:
  • Edit the 'C:\autoexec.bat' file and add the following line at the end:
    SET PATH=%PATH%; c:\java\jdk\bin
Setting up the path for Linux, UNIX, Solaris, FreeBSD:

Assuming you have installed the Java in /opt/java/jdk directory.
  • Edit the '.bashrc' file available in user home directory and add the following line at the end: 
        export PATH=/opt/java/jdk/bin:$PATH

No comments:

Post a Comment