Recently, I have used Java again. Sometimes I need to do some simple tests. I am used to sublime, so I want to run Java in sublime.
Enter the sublime installation directory and use the compression software to open Package/Java.sublime-package
Edited as follows
add variants
{ "shell_cmd": "javac \"$file\"", "file_regex": "^(...*?):([0-9]*):?([0-9]*)", "selector": "source.java", "variants":[{ "name": "Run", "shell_cmd": "java \"$file_base_name\"" }] }
after completion
Just press the shortcut Ctrl + Shift + B
Select JavaC to compile, JavaC - Run to run