DzikiChrzan
DzikiChrzan

Reputation: 3107

Run java with terminal

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

Answers (1)

mattias
mattias

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

Related Questions