Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

jdev and jar file

user503407Mar 2 2010 — edited Mar 3 2010
I am trying to use the jar deployment profile in JDeveloper 10.1.3.1 to create an executable jar that uses jdbc to connect to a db to display information. I created the jar file and when I try to run it with the following command: java -jar c:\dbaccess.jar I get the following:

Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdbc/OracleDrver

So, I am missing a jdbc jar file; the following did not work, still get the same error:

C:\>java -classpath c:\java\jdeveloper10_1_3_1\jdbc\lib\ojdbc14.jar c:\dbaccess.jar

I tried setting the classpath to include all the necessary Oracle JDBC jar files and still get the same error. I then went back to Jdeveloper and created a File Group within my JAR Deployment Provide to
include all the Oracle JDBC driver...the drivers were then exported to my jar file. Then when I tried to run java -jar c:\dbaccess.jar I still get the NoClassDefFoundError.

This is something that is not documented real well anywhere...can anyone point me in the right direction?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 31 2010
Added on Mar 2 2010
14 comments
2,153 views