Hello,
Can anyone help me get java working on my pc, I use this bit of code:
saved as priem.java
I compile it and it creates the .class.
I type in java priem.
And the command prompt returns this:
It gives the same error, not being able to find the clas, on any java file, the same bytecode works fine on another pc...
Can anyone help me get java working on my pc, I use this bit of code:
Code:
class priem
{
public static void main(String[] args)
{
System.out.println("hello world");
}
}
I compile it and it creates the .class.
I type in java priem.
And the command prompt returns this:
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: priem
Caused by: java.lang.ClassNotFoundException: priem
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
Could not find the main class: priem. Program will exit.
It gives the same error, not being able to find the clas, on any java file, the same bytecode works fine on another pc...
Last edited: