Run Java file in terminal in Intellij?
Question is in the subject:
Wants to run the file test.java in the terminal
Can someone please help me here
… javac test.java
Java test
That should be normal, right?
Question is in the subject:
Wants to run the file test.java in the terminal
Can someone please help me here
… javac test.java
Java test
That should be normal, right?
Hello,
So first you should (if you want to write correct code) change the name of test.java to Test.java.
As has already been written, you have to start the program in the src folder. Change folders with the command “cd [folder name]”. Otherwise, you can also click the green arrow at the top right to start the program.
Kind regards, Codeline
Habs grazed and renamed the class to test
javac test.java
Java test
👍
I replied 😉
I have another question. Intellij created a .css file. This is detected. Only the code is displayed completely in black.
Do you know how to change this so that the code is deposited beautifully in color?
Thanks for your help:)
You also need to READ what is in the error messages.
Your Java file is located from your current directory of your terminal in the subfolder src.
Of course he doesn't find the .java file.
Thank you.