Sublime Forum

Running java files in sublime text 3 in linux


how can i run java files with input in sublime text 3 i am using linux so i cant really figure it out
i tried using this build but it says no build system out i also have installed and setup terminus package
“target”: “terminus_exec”,
“cancel”: “terminus_cancel_build”,
“shell_cmd”: “javac $file && java $file_base_name”
can someone help me out?


  1. May require working_dir for java to find compiled class via $file_base_name.
  2. I had to quote \"$file\" due to whitespace in paths.
    "target": "terminus_exec",
    "cancel": "terminus_cancel_build",
    "shell_cmd": "javac \"$file\" && java $file_base_name",
    "working_dir": "${file_path:${folder}}"

The following simple Hello World app runs successfully then.

public class HelloWorld {

   /* This is my first java program.
    * This will print 'Hello World' as the output

   public static void main(String []args) {
      System.out.println("Hello World"); // prints Hello World



thanks its working like a charm !