I have multiple .java files for my hadoop project. How do I execute them without using eclipse?
PS: I use the default ubuntu terminal
You can use javac *.java to compile all the files in the current working directory. As for executing them, use java filename
Where the filename does NOT have the .class at the end. IE, you have MyProgram.java which compiles into MyProgram.class you would type: java MyProgram
You want the run the main class of your project btw (slightly vague, but it might be the only one with a main method).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With