I was part of the Java coding class.
•1 year ago
published a Repl
On Java, I want to run a public class I have made in a file, i.e File.java Is there a way to make Main.java run code from a public class other than M
AliAkram9 Try this method 1.you can see the below the command in console java -classpath .:target/dependency/* Main 2.copy paste it again but only change the Word "Main" to the file name you want to run , like if you want to run file input.java you should paste this and run the file java -classpath .:target/dependency/* input This works for me3 months ago
ash15khng In repl.it you can only run the main file created by repl.it sadly.3 years ago
Highwayman Does this answer your question? https://stackoverflow.com/questions/13174031/how-to-run-java-class-file-from-another-class-file-java-newb3 years ago