I was part of the Java coding class.
•2 years 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
AliAkram9Try 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 me1 year ago
ash15khngIn repl.it you can only run the main file created by repl.it sadly.4 years ago
HighwaymanDoes this answer your question? https://stackoverflow.com/questions/13174031/how-to-run-java-class-file-from-another-class-file-java-newb4 years ago