Basic preferences for Java development

Java is a highly secure, object-oriented programming language that can run on any platform and is portable. This advantage of Java makes Java the most used language in the world.

However, in order to use and develop Java properly, it is necessary to set a basic environment first.

Setting the default environment is not difficult. Just follow these 4 steps to set up the basic environment to use Java.

1. Download Java

First, access Oracle home page and download the JDK (Java Development Kit) for your operating system.

When you access the site, you can see several versions of JDK. Find the required version and install it.

2. Installing the Java JDK

After downloading the JDK, double-click the downloaded JDK file to install it. The installation process is not difficult. Please refer to the image below.

It is recommended that you uncheck “Use Java Content in Browser” on the Custom Setup screen for security reasons. Allowing browsers to use Java content allows hackers to remotely execute code on vulnerable systems.

3. Setting Java environment variables

When you finish installing the JDK, you need to set the JAVA environment variable. This is the most important part of preferences for Java development.

Set JAVA_HOME, PATH and CLASSPATH variables for JAVA development environment.

The CLASSPATH variable is not a required variable at the moment, but it is recommended that you set it beforehand because it is used when you need to use an external library or to interact with other programs.

To set the Java environment variable, click System> Change Settings in the Control Panel to open the System Properties window.

When the System Properties window opens, click the ‘Environment Variables’ button at the bottom.

Click the Environment Variables button and set the following variables when the environment variable setting window appears.


  • Variable name: JAVA_HOME
  • Variable Value: The path where the JDK is installed

The reason for setting the JAVA_HOME variable is to manage multiple JAVA versions. This variable is used to set the PATH and CLASSPATH to be set later.

This is convenient because if you install a new version of Java later, you only have to change the JAVA_HOME variable.


System variables for environment variables include the PATH variable. Find the variable and add %JAVA_HOME%\bin; at the front of the variable.

The reason for setting the PATH is to allow JAVA commands to be executed from anywhere on my computer. This tells to system you where JAVA is installed.

JAVA_HOME points to the root folder where Java is installed and there is an bin folder under this folder. The bin folder contains Java executables.

CLASSPATH settings

  • Variable name: CLASSPATH
  • Variable value: %JAVA_HOME%\lib\tools.jar;

CLASSPATH is not used when using native libraries. However, it is a variable that is used when an external library is used or when it needs to be linked with another program.

4. Java command test

If you have set all the environment variables, you should check if the Java environment variables are set correctly.

If you open the terminal and type javac, the code is output as shown below.

We live in an era that we do a lot of work through computers. Perhaps it is also important to learn computer language as much as we try to learn other foreign languages.

Maybe, Setting the development environment well is a good starting point for learning the programming language of your computer.

Leave a Reply

Your email address will not be published. Required fields are marked *

2 thoughts on “Basic preferences for Java development

Latest Post

  • Mastering the daily conversation in 4 languagesBasic sentences expressing my mood – I’m
  • 8 things you need to think about for work-life balance
    View on Youtube Image: who works as a design VP for Facebook, presented 8 ways for work and life balance in her article “The
  • 10 special abilities of Smartphone
    View on Youtube No matter where you go or what you do, your smartphone is always with us. We use the internet with a smartphone,
  • Java: abstract class, abstract method
    An abstract class in Java is a class that declares an abstract function to be implemented in a subclass as an abstract method. An abstract
  • Java: inheritance and constructors
    When an object is created from an inherited class, the constructor of the superclass is performed before the constructor of the subclass. That is, when
  • Java reserved words: super, final
    super is a Java reserved word that is used to access member variables or methods of a superclass that is obscured by a subclass. Access
  • Java: finalize method and garbage collection
    The Java Virtual Machine(JVM) automatically performs garbage collection for objects that are no longer needed for efficient system operation. At this point, the JVM calls
  • Java: Method overloading
    Method overloading is the same concept as constructor overloading. That is, you can use methods of the same name in the same class, but methods
  • Java final variable
    You can specify an end variable using the reserved word final. The final variable represents a constant value that can not be changed. Typically, final
  • Java class variables
    Class variables are declared with static and have the concept of global variables. Class variables are used for the following purposes. Object references and object