0
Exampleprogram not workong
when I pressed javac example program.java in commandpromt it automatically went to next line after that I pressed java exampleprogram as they said in tutorial and it came a error "could not find main class exampleprogram " this was the error
8 Respuestas
+ 2
Share your code
+ 2
Code is ok, check the filename. It's letter case has to be same as of the class name. This may be a problem that I am able figure out.
+ 2
Then add path of jvm and compiler into Windows path variable.
1. Right Click on My Computer
2. Select Properties command
3. On left pane of open Window, choose
Advance System Settings
4. Click Environment Variables button
5. In the Edit System Variable window, specify
the value of the PATH environment variable.
6. Close all dialog box.
7. Open Command prompt window, and run
your java code.
Hope this may help🤗
0
I need to know why its not working
0
public class ExampleProgram {
public static void main(String[ ] args) {
System.out.println("Hello World");
}
}
0
its correct I saved it on desktop and when I press in command promt everything goes well but at last when I press java ExampleProgram it says the file not found
0
I set the path after installing java it was done before after setting path I started exampleprogram and it came file not found