NoClassDefFoundError only running jar
Ppl,
I'm not sure if that's the right place to post this question...sorry if it isn't.
I'm getting crazy with this problem.
I'm trying to compile this simple line of code
DriverManager.registerDriver(new org.postgresql.Driver());
It compiles well in Eclipse but, after exporting to jar, I can't run it in the command line with
java -jar myJarFile.jar
it throws the following exception
Exception in thread"main" java.lang.NoClassDefFoundError: org/postgresql/Driver
at teste.main(teste.java:16)
I have the postgresql-8.2-504.jdbc3.jar file in the same directory of my jar file.
What the hell is the problem?
Thanks in advance!
Filipe

