[Best method] Compile and run multiple java files using Sublime text 3
Code to put in *.sublime-build
{
"cmd":["javac", "*.java", "&&", "start", "cmd", "/k" ,"java","$file_base_name"],
"selector": "source.java",
"working_dir": "${file_path}",
"shell": true
}
Instructions, in case you couldn't comprehend what I was saying:
1. Locate your sublime text packages folder, at C:\Users\(your name)\AppData\Roaming\Sublime Text 3\Packages\User
2. Create a new file. Name it anything, but afterwards put '.sublime-build'. An example would be MyJavaBuild.sublime-build
3. Open the file using notepad, copy and paste the above code, then save the file.
4. Go to sublime text, navigate to Tools ) Build System ) (your named file)
5. Hit ctrl+b to compile and run
I was annoyed seeing literally no help for compiling using sublime, and even less help for compiling multiple files. So I took it upon myself to make this guide.
This method:
-Opens a console that accepts input
-Is compatible with GUIs
-Opens console even with just a GUI program
-Compiles and runs all java files in your folder at once
-Overwrites all classes in your folder (so you dont have to manually delete .class files each time you want to test a multi-file program)
So, I believe this is the best possible method for compiling and running programs using sublime.
Видео [Best method] Compile and run multiple java files using Sublime text 3 автора Java Revealed: раскройте секреты
Видео [Best method] Compile and run multiple java files using Sublime text 3 автора Java Revealed: раскройте секреты
Информация
5 декабря 2023 г. 15:31:30
00:01:29
Похожие видео