Today, I am going to write about how you can compile and run your Java program from Sublime Text.
First, you need to set a Build System. To achieve it, follow below steps:
1) Goto Tools -> Build System -> New Build System
2) A editor tab will open. Remove all predefined code and paste below code
"shell_cmd": "javac $file_name && java $file_base_name",
After pasting above code, save file with Java.sublime-build under sublime-text-3/Packages/User/.
Now, Goto Tools -> Build System and select Java (you will see new build after following above steps).
Now press Ctrl+B and enjoy the result. Please note that Ctrl+B is used to Build your program.
Enjoy coding with this lightweight software. Do comment if above post helps you.