using jar file hits Exception in thread "main" java.lang.NoClassDefFoundErr
hjz1321Aug 30 2010 — edited Aug 31 2010I am using jdeveloper to deploy client side jdbc app to a jar file, however, I got following error while running java -classpath .:classes12.jar -jar myjarfile.jar
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource
I have been scratching my head trying to set -classpath to different format but no luck, same error each time. So I tried to deploy only class files(only two classes totally) directly and it works
java -classpath .:classes12.jar myclassfile
So this implies that it's nothing to do with -classpath command line setting, it's more of somewhere not correct in the deployed jar file. Is there anyway in deploy profile or project property that I need to set in order to make the jar file correct?
on project property window, under libraries and classpath, i tried to check and uncheck Export box next to Oracle JDBC entry under classpath Entries list, no luck either way.
Thanks!