Community
Participate
Working Groups
when the following statement is executed, an java exception occurs Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"); java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver In preferences, I created classpath variable as follows: db2a - C:/SQLLIB/java/db2java.zip This zip file contains the class that cannot be found so I should not be getting this error.
Does it work better if you compiler and run with another compiler/vm (outside Eclipse) ?
Actually the exact questions are: 1. does it work better if compiling the files with javac ? 2. does it work better if running the (Eclipse) files with java (using manual console launch).
0601. This works fine for me (My db2java.zip is dated 2/22/02 so it likely older than yours) Did you add the variable to your build path? Defining the variable in the preferences does not add it to your project. Note: you no longer need to go to preferences at all - you can just add a variable to your classpath in the java build path page (either during project creation or by selecting project properties to do it later). Items on your buildpath are automatically added to your runtime classpath. You can explicitly add variables to your runtime classpath in the Launch Configuration Wizard.
Closing, please reopen if you can still make the problem occur given the recommandations.