0

hi everyone. i get this error in my porject at runtime.actualy it was working fine. i added the jdbc jar to my project and here what i get at runtime

java.lang.NoClassDefFoundError: de/vogella/mysql/first/test/Main
Caused by: java.lang.ClassNotFoundException: de.vogella.mysql.first.test.Main
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Exception in thread "main"

it works fine again f i remove the jar. anyone can tell me what the problem is.

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by kesh1000
0

check your classpath, there's an error in it.
Most likely you're not setting it properly so the directory with your compiled classes isn't included.

0

can u give me the steps as to what i need to change in class path. here my current class path value


.; C:\Program Files\Java\jdk1.5.0\; C:\Program Files\Java\jdk1.5.0\lib\tools.jar;

Edited by kesh1000: n/a

0

are you using an ide like netbeans? if you are then you can go to project properties and add the jar folder there and see if it works.

0

yeah i use eclipse. what i did was created a new folder named lib to my project imported file system. selected the folder which contained connecor file. then i acessed properties of the project then in the java build path in the libraries tab i added the jar file. it worked when i first created a project but than somehow it stopped working.i have a doubt it stoped because i instaled microsoft visio web developer.does anyone know the fix.urgently needed.thanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.