Reputation: 3107
Is it possible to run in terminal java program that contains multiple files? When I'm using
javac main.java
terminal can't find any files except main.java
Upvotes: 0
Views: 5346
Reputation: 2108
First you compile your .java files
javac *.java
then you run it by typing,
java main
where main is the class with your main method, in the terminal.
Upvotes: 3