java - Using DB2 and jdbc on Mac OS X -


i'm using mac os x snow leopard , ibm's db2. have , running, imported schema.sql , can manipulate database via sql-commands. connecting db in java need jdbc driver ibm, googled , downloaded correct version site: http://www-01.ibm.com/support/docview.wss?uid=swg21363866

then extracted , pasted db2jcc.jar eclipse projects folder. configured buildpath , listed referenced library. fyi: exercise college. adviced copy-paste class: http://pastebin.com/3gyxdnxu did , wrote main method calling openconnection. getting:

 java.lang.classnotfoundexception: com.ibm.db2.jdbc.app.db2driver 

my password, username correct. doing wrong. need set kind of classpath on mac os x?

you have check build path (right click on project) , make sure db2 library in class path. not enough put jat in project folder.

also, if library present build, not present execution. have modify "run configuration" , modify classpath, or working directory.

this not db2 problem, java classpath problem.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -