[Best method] Compile and run multiple java files using Sublime text 3

Pubblicato il: 29 ottobre 2020
sul canale di: bob bob
498
0

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.


In questa pagina del sito puoi guardare il video online [Best method] Compile and run multiple java files using Sublime text 3 della durata di ore minuti seconda in buona qualità , che l'utente ha caricato bob bob 29 ottobre 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 498 volte e gli è piaciuto 0 spettatori. Buona visione!