How to set up Sublime Text 3 for Running Java

Ankit Kesar
Sep 7, 2022

--

Java is one of the most used languages for cp(Competitive programming).

Sublime Text is a trendy editor for writing code.

First things first

  • install the latest JDK on the system
  • install sublime text on system

NOTE : To be able to compile and run java program you need to set environment variables

In this tutorial, I am going to create a new build system which will make life easy

Go to Tools->Build System -> New Build System

follow the steps

Copy the following build commands into the file and save as Java_Build.sublime-build file

Now go to

Tools->Build System and then choose Java_Build

Now you can run any java file by pressing ctrl+shift+b

Output window

--

--