I recently have gotten Sublime Text 2 and I had a few headaches so far, the biggest one being from this:
public class bob{
public static void main(String[] args){
System.out.println("Sublime Text 2!");
}
}
because it won’t run at all. It just won’t run. I press F7 and nothing happens, except it outputs this:
[Finished in *s]
and I have no idea why.
Default Java build system does not run your program after compilation.
If you open
...\Packages\Java\JavaC.sublime-buildand replace the content of the build system file with:EDIT: in the above you need to concatenate multiple commands for the shell to execute because the build system does not support listing multiple commands by itself.
Then it will compile and run your program when you build ( F7 ).
This is a very simplistic build system and will only work for simple programs obviously.