Error while trying to run program using java.exe
First of all I'd like to apoligize if this thread already exists here somewhere.. I've spent the last hours Googling and searching the forums for an answer, but haven't found one, so I posted a topic..
The problem is the following:
I'm using Netbeans 5.5 with JDK1.6.0. When I build/run a Java application in this IDE, I get no errors whatsoever..
But, when I try to run it from the prompt, using following code (I copied the .class file into the same directory as the .java file)
java -classpath . main.java
I get the following errors:
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Sour
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Metho
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Sourc
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
I'm quite sure that the problem is something I'm simply missing, since Netbeans runs everything without troubles..
Anyone an idea how I could solve this problem? (Trust me, I checked the net, lots of people with this prob, but no decent solutions given)
Thanks in advance (and once again sorry if this thread already existed).
Greetings,
Tribio

