I know how to run my Java program from the command line. My path to Main.java
is:
my_dir/turtlesolution
turtlesolution
has the following:
Main.java
Turtle.java
Turtles.java
I opened turtlesolution
as the project, using IntelliJ. I then opened (by double clicking) Main.java
. I want to run this. I have to edit configurations
before I run it, it seems.
So I clicked edit configurations
. I clicked JAR application
because this looks like the option. This is what comes up:
Working directory, I set it to point to turtlesolution
. What is Path to JAR
? I tried to set it to turtlesolution
but it remains blank. What does Warning, jar file doesn't exist
mean?
I can run it from the command line by just doing
cd turtlesolution
javac Main.java Turtle.java Turtles.java
cd ../
java turtlesolution/Main
Aapprently it's very easy to figure out. I'm in my final year of learning CS in university and apparently it's simple, but I can't figure out how to do it, and it's too simple to teach ...