0
have tried: Unable to find or load the main file class.java
I’ve tried the system and it still works like when I use it javac arquivo
javac -version
java -version
everything works more when I use java arquivo
It works n know what’s going on and everything by cmd.
I’m starting to learn how to use java.
Code:
class main {
public static void main (String[]args){
System.out.println("Ola mundo");
}
}
Where’s the code you’re trying to run? Add to question.
– user28595
the code and simple class main { public Static void main (String[]args){ System.out.println("Hello World"); } }
– Shintaro
Please click EDIT and add the full class you are trying to compile and generates this error.
– user28595
Except for the minuscule class name, I believe the problem is the same as the two questions that Inkei. Try again by following the recommendation of the two answers, or edit this question by further detailing your problem, if possible with prints.
– user28595
I’ve tried the one you sent more I’ve tried many of the ones you have here and in other forums
– Shintaro
You have two questions, see both. If it doesn’t work, follow my recommendation from the last comment by editing the question.
– user28595
The name of your class is
main
with even lower case letter? It’s not a good name, but if so, make sure it’s inside a file calledmain.java
(lower case). Then try rotatingjavac main.java
and finallyjava main
. If it doesn’t work, tell me what the mistake was.– Victor Stafusa
I did everything you said and gave it Error: Could not find or load main class main Caused by: java.lang.Classnotfoundexception: main vo try to change class name
– Shintaro
worked used 'java ola'
– Shintaro