Java Tutorial: Environment Setup
If you are interested in setting up your environment to run the Java programming language, this article guides you on how to download and set up Java on.
Join the DZone community and get the full member experience.
Join For FreeLocal Environment Setup
If you are still willing to set up your environment for the Java programming language, then this section guides you on how to download and set up Java on your machine.
Follow the instructions to download Java and run the .exe
to install Java on your machine. Once you installed Java on your machine, you will need to set environment variables to point to correct installation directories.
Setting Up the Path for Windows
Assuming you have installed Java in c:\Program Files\java\jdk
directory, right-click on 'My Computer' and select 'Properties.'
Click the 'Environment variables' button under the 'Advanced' tab.
Now, alter the 'Path' variable so that it also contains the path to the Java executable. For example, if the path is currently set to C:\WINDOWS\SYSTEM32
, then change your path to read C:\WINDOWS\SYSTEM32;c:\Program Files\java\jdk\bin
.
Setting Up the Path for Linux, UNIX, Solaris, and FreeBSD
The environment variable PATH should be set to point to where the Java binaries have been installed; refer to your shell documentation if you have trouble doing this.
For example, if you use bash as your shell, then you would add the following line to the end .bashrc: export PATH = /path/to/java:$PATH
Opinions expressed by DZone contributors are their own.
Comments