Skip to content

Instantly share code, notes, and snippets.

@p8R
Created May 9, 2018 11:16
Show Gist options
  • Save p8R/b988570683882f0fafb0a2d352412339 to your computer and use it in GitHub Desktop.
Save p8R/b988570683882f0fafb0a2d352412339 to your computer and use it in GitHub Desktop.
SublimeText 3 Java build system 2 variants: build (Ctrl+B), run (Ctrl+Shift+B)
{
"cmd": ["javac", "$file"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java",
"shell": true,
"encoding": "cp1250",
"variants": [
{ "cmd": ["java", "$file_base_name"],
"name": "Run Java"
}
]
}
@p8R
Copy link
Author

p8R commented May 9, 2018

Place above code in the file C:/Users//AppData/Roaming/Sublime Text 3/Packages/Java/JavaC.sublime-build
If file doesn't not exist, create it. Also change source code encoding if necessary.

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