Skip to content

Instantly share code, notes, and snippets.

@arjamizo
Forked from tsuyo/JavaC.sublime-build
Last active August 29, 2015 14:05
Show Gist options
  • Save arjamizo/cdedf5968ee26fa5ecda to your computer and use it in GitHub Desktop.
Save arjamizo/cdedf5968ee26fa5ecda to your computer and use it in GitHub Desktop.
{
"windows": {
"cmd": ["cmd", "/c", "mkdir bin 2> nul & echo CD %cd% & echo Path %path% & echo Note that this script works only for default package & javac -d bin $file && echo Build successful. && java -cp bin ${file_name/\\.java//}"]
},
"linux": {
"cmd": ["sh", "-c", "javac $file_base_name.java && java $file_base_name"]
},
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java"
}
/*
To test paste this to ST3 and run!
public class Launcher {
static {
System.out.println("Hello ST3!");
}
public static void main(String[] args) {
}
}
You will see output in console.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment