How to Setup Sublime Text 3 for Java in Windows?

Java is one of the most popular and widely-used object-oriented programming languages. Java syntax is similar to C/C++. But Java does not provide low-level programming functionalities like pointers. Also, Java codes are always written in the form of classes and objects. The Java codes are first compiled into byte code (machine-independent code). Then the byte code is run on Java Virtual Machine (JVM) regardless of the underlying architecture.

Written by a Google engineer sublime text is a cross-platform IDE developed in C++ and Python. It has basic built-in support for Python. Sublime text is fast and you can customize this editor as per your need to create a full-fledged Python development environment. You can install packages such as debugging, auto-completion, code linting, etc. There are also various packages for scientific development, Django, Flask, and so on.

Downloading and Installation

Java can be downloaded from To install Java compiler on Windows, go through How to install Java on Windows?

Sublime Text 3 can be downloaded from its official site To install sublime text 3 on Windows, go through How to install Sublime Text 3 in Windows?

Setting up Environment Variable

  • Step 1: Click the Advanced system settings link.

  • Step 2: Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.

  • Step 3: In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. Click OK. Close all remaining windows by clicking OK.

Working on Sublime Text3

After the installation process is over and we are done with the environment setup, we need to test whether our compiler and IDE working or not. For this we will write a simple output based program:





public class HelloWorld 
    public static void main(String[] args)


Attention reader! Don’t stop learning now. Get hold of all the important Java and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :
Practice Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.