How can you get rid of the main.java file and replace it with another file?
How can you get rid of the main.java file and replace it with another .java file?
After that you have to use the Console to Compile/Run your Program
Type "dir" to list all files in the Directory/Folder
Type "javac [File_Name].java" to compile to code into a usable .class file
Type "java [File_name]" to run the .class file
"clear" clear all from console (Optional)
The only workaround I have found is to copy the source into Main.java and then give the class file the name Main. But that limits being able to give multiple assignments to students.
bottom line, i don't want Main to be executed first.
Another route might be to use a polygott repl and set up a makefile to compile and run whatever java file you want.