Skip to content

Instantly share code, notes, and snippets.

@mattst
Created April 26, 2020 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattst/7b50925fb9f00f56476276fe2cf21049 to your computer and use it in GitHub Desktop.
Save mattst/7b50925fb9f00f56476276fe2cf21049 to your computer and use it in GitHub Desktop.
JavaC.sublime-build alternatives
// ~/.config/sublime-text-3/Packages/Java/JavaC.sublime-build
// -----------------------------------------------------------------------------
// ST default JavaC.sublime-build:
{
"shell_cmd": "javac \"$file\"",
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java"
}
// -----------------------------------------------------------------------------
// ST default JavaC.sublime-build with javac full path added:
{
"shell_cmd": "/usr/bin/javac \"$file\"",
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java"
}
// -----------------------------------------------------------------------------
// Custom command to compile and then run it with full path:
{
"shell_cmd": "/usr/bin/javac \"$file\" && /usr/bin/java \"$file_base_name\"",
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java"
}
// -----------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment