Search code examples
sublimetext3sublimetexttext-editor

How to run java file in Sublime text?


I like sublime text editor but the problem is whenever i want to execute the program i have to do it in terminal. Is there anyway to solve this issue?


Solution

  • You can also execute java program from sublime text editor. Follow following steps:

    1. After saving as .java file click on Tools header
    2. Click Build System and select javaC.
    3. Now you are ready you can build program with Ctrl+B shortcut or go to Tools and press Build.
    4. Once compilation has succeed you can run program by pressing java under Build System of Tools.

    visit following link for more details. visit https://docs.cs.cf.ac.uk/notes/java-on-windows/#:~:text=In%20Sublime%20Text%20you%20can,run%20them%20with%20with%20java%20.