Skip to content

Instantly share code, notes, and snippets.

@tsuyo
Created August 2, 2012 07:00
Show Gist options
  • Save tsuyo/3234646 to your computer and use it in GitHub Desktop.
Save tsuyo/3234646 to your computer and use it in GitHub Desktop.
JavaC.sublime-build to both compile & run a Java class at the same time for Sublime Text 2
{
"cmd": ["sh", "-c", "javac $file_base_name.java && java $file_base_name"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java"
}
@arjamizo
Copy link

Thanks! I have played a little bit with it and it turns out that you can only run classes contained within default folder.

I had to run this on Windows so I have also provided version for windows. If you are interested - look at my fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment