Sublime, the results found only compile, unable to run directly, so on-line search solutions, found that most of the methods are to tell you to enter Java.sublime-packag this file, and then modify JavaC.sublime-build , and then you can.
First Java.sublime-packag of all, this thing is a zip compressed file, it may be very good for Windows, directly open with zip or rar, and then modify JavaC.sublime-build it. But I am a TMD Linux ah, and is installed the smallest graphical interface, this method is not used.
Below to get to the point, how to do is the most simple rough and absolutely easy to use method. That is:
- Go
/root/.config/sublime-text-3/Packages/User to this folder, or click Select to go to the Preferences Browse Packages user folder.
- Establish
MyJavaC.sublime-buildFile, name can be random, suffix do not change the line, in the inside fill in
{"shell_cmd""javac \" $file \ "&& java \" $file _base_name\ " " ,"file_regex""^ (.... *?):( [0-9]*):? ([0-9]*) " , " selector " " Source.java " ,}
3. SelectTools–>Build WithThen choose the build file that you created yourself.
4. Test, DirectCtrl-B, look good to make.
Ubuntu 14.04 Sublime Text3 Java compilation run (easiest way)