Environment Setup


For your ease, we have set up the Java Programming Environment online, so that you can assemble and operate all the available instances online. It provides you confidence in what you are learning and permits you to check the programs with different options. Please feel free to upgrade any example and operate it online.

Below is the simple code box for the example try this:

public class MyFirstJavaProgram {
   public static void main(String []args) {
      System.out.println("Hello World");

Local Environment Setup

If you need to set up your own environment for the java programming language, then here in this section we will guide you and tell you the whole process. To set up your own Java Environment please follow the below-given steps:

Java SE is accessible for the free download option. click here to download, before downloading please check the version which is well suited to your operating system.

Instructions to download Java are as follows, Run the .exe to install Java on your device.

Once you have completed the installation of Java on your machine, you have to set environment variables to point to the right installation directories.

Setting Up the Path for Windows 2000/XP

We are presuming that you have already installed Java in the c:\Program Files\java\jdk directory.

  • Search and Right-click on the 'My Computer' option and then select 'Properties'.
  • Click on the 'Environment variables' option present under the 'Advanced tab.
  • Now, edit the 'Path' variable and add up the path to the Java executable directory at the end of it. For example, if the path is presently set to C:\Windows\System32, then change it the following way
    C:\Windows\System32;c:\Program Files\java\jdk\bin.

Setting Up the Path for Windows 95/98/ME

We are presuming that you have already installed Java in the c:\Program Files\java\jdk directory.

  • Change the 'C:\autoexec.bat' file and at the end add the below-given line
    SET PATH=%PATH%;C:\Program Files\java\jdk\bin

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

Environment variable PATH must be set to point to where the Java binaries have been installed. If you face any trouble doing this please go and check your shell documentation.

For instance, if you use bash as your shell, then at the end of your .bashrc you should add the below line:

export PATH=/path/to/java:$PATH'

Popular Java Editors

To write down the Java programs, a text editor is needed. There are even more experienced IDEs available in the market. The most popular one is described properly below:

  • Notepad − On Windows devices, you might use any simple text editor such as Notepad (we recommended this for tutorial) or WordPad. Notepad++ is also a free text editor which has improved facilities.
  • Netbeans − Java IDE is open-source and also free that can be easily downloaded from www.netbeans.org/index.html.
  • Eclipse − Java IDE is made by Eclipse, an open-source community and you can download it from www.eclipse.org.

Integrated Development Environment (IDE), gives all the common tools and facilities to assist in programming, for example, source code editor, build tools and debuggers, etc.