I am trying to compile and run Java code in Sublime Text 2. Don\'t just tell me to do it manually in the Command Prompt. Can anyone tell me how?
Btw, I am on Windows
This is how I did it with these easy steps:
Setup a new build system:
Tools > Build System > New Build System
Replace the default code with the following:
{
"cmd": ["javac","$file_name","&&","java","$file_base_name"],
"path": "C:\\Program Files\\Java\\jdk1.7.0_25\\bin\\",
"shell": true
}
// locate the path of your jdk installation and replace it with 'path'
Save the file by giving it a name (I named mine "Java")
Activate the build system: