Categories
Java Windows 10

Run java program in sublime text 2 or 3

Java or any other program could easily run from the sublime text. Just we need to build a build system and build using it. Follow the easy steps below:

Step 1: Create a new Build System

This image has an empty alt attribute; its file name is image-85.png
This image has an empty alt attribute; its file name is image-86.png

Step 2: Copy the code written below, and save it

{
    "cmd": "javac ${file_name} && java ${file_base_name}",
    "file_regex": "^[ ]file \"(...?)\", line ([0-9]*)",
    "path":"C:\\Program Files\\Java\\jdk-13\\bin\\",
    "selector": "source.java",
    "shell":true
}
This image has an empty alt attribute; its file name is image-88.png

Give it a name JavaComiler or anything you like

Save again

Step 3: Select your build system; Tools->Build System-> Select JavaCompiler

I have written a Java Program, in current tab and saved it on desktop, in order to run it

Now click on Build to Build the java program

It has been built successfully.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.