I downloaded java development kit on my opensuse 13.1 and I wrote small newbie program. This was an error on the screen: could not find or load main class Example1.java.
I did not understand what prompted this error. Could somebody help me to address this problem. Thanks.
It cannot find the main class Example1.java
On a more serious note, it’d help if you posted your code, and the command
you ran to compile it, and the command you ran to try to run it, and the
instructions you’re following to do all of this. From an old memory, the
steps you should take are to write the Example.java file, include a public
static Main() function, compile with ‘javac’, then call with ‘java’
specifying Exampl1 as the class.
–
Good luck.
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…