logo

Java Environment Setup


Show

In this Java Tutorials, we will discuss the different aspects of setting up a congenial environment for Java.

Local Environment Setup

If you are immobile eager to install your surroundings for Java programming language, then this segment leads you on how to download and arrange Java on your machine. Following are the paces to implement the environment.

Java SE is liberally obtainable from the link Download Java. You can download a version based on your operating system.

Go after the lessons to download Java and run the .exe to install Java on your machine. Once you have installed Java on your machine, you will call to set environment variables to the top to accurate installation directories −

Setting Up the Path for Windows

  • Assuming you have installed Java in
    'C:WINDOWSSYSTEM32', then change your path to read 'C:WINDOWSSYSTEM32;c:Program Filesjavajdkin'.
  • 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:WINDOWSSYSTEM32', then change your path to read 'C:WINDOWSSYSTEM32;c:Program Filesjavajdkin'.

Setting Up the Path for Linux, UNIX, Solaris, FreeBSD

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 of your '.bashrc: export PATH = /path/to/java:$PATH'