how to run jar file with external library ojdbc6.jar
879562Aug 1 2011 — edited Oct 15 2014Hi, I wrote a simple program in JDeveloper to connect to Oracle database 11g. And I included ojdbc6.jar as Jar file in the project property.
Everything works fine in JDeveloper, I can get connected and do query. However, when I deployed the app to a JAR file, (Include the library dependency) it gives me the error:
Message: No suitable driver found for jdbc:oracle:thin:
I thought this may be caused because the my jar file doesn't link with the library.
I tried to remake jar by writing a manifest with Class-Path: ojdbc6.jar and run jar cfm manifest.mf app/*.class
running with -classpath option in cmd
But it doesn't work outside JDeveloper, maybe I missed something?
Anyone knows what is the problem?
Thanks so much