Andrei Rodionov
asked on
NoClassDefFoundError with my jar-application using Oracle JDBC driver
Hi ppl,
There's an application uses Oracle JDBC driver. When I run it as .class-files thru java <mypackage.myMainClass> it works fine. Now I've made a jar-version of my application. But when I run it as java -jar <myjar> I've got Exception in thread "main" java.lang.NoClassDefFoundE rror: oracle/jdbc/driver/OracleD river
My CLASSPATH is the same and it's correct. I'm not sure there's a problem with my jar file, Oracle JDBC driver or something else.
Just FYI:
J2SDK 1.4.0 under Windows XP
Oracle JDBC drivers (versions 8.1.7 and 9.0.1)
Andrew.
There's an application uses Oracle JDBC driver. When I run it as .class-files thru java <mypackage.myMainClass> it works fine. Now I've made a jar-version of my application. But when I run it as java -jar <myjar> I've got Exception in thread "main" java.lang.NoClassDefFoundE
My CLASSPATH is the same and it's correct. I'm not sure there's a problem with my jar file, Oracle JDBC driver or something else.
Just FYI:
J2SDK 1.4.0 under Windows XP
Oracle JDBC drivers (versions 8.1.7 and 9.0.1)
Andrew.
post your CLASSPATH
ASKER
C:\PROJECTS>echo %CLASSPATH%
.;C:\ORACLE\8.1.7\jdbc\lib \classes12 .jar;C:\PR OGRA~1\fre emarker\li b\freemark er.jar
.;C:\ORACLE\8.1.7\jdbc\lib
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
C:\PROJECTS>echo %CLASSPATH%
.;C:\ORACLE\8.1.7\jdbc\lib \classes12 .jar;C:\PR OGRA~1\fre emarker\li b\freemark er.jar
.;C:\ORACLE\8.1.7\jdbc\lib
ASKER
I see.
I've found an info how classes are found. Here is a quote: "...The JAR archive specified by the -jar option, which overrides all other values. If this option is used, all user classes come from the specified archive."
Terrible... Anyway, thanks.
Andrew.
I've found an info how classes are found. Here is a quote: "...The JAR archive specified by the -jar option, which overrides all other values. If this option is used, all user classes come from the specified archive."
Terrible... Anyway, thanks.
Andrew.