Shouldn't it be "java JdbcTest" instead of "java jdbctest" (case sensitive) ?
Good Luck... Ching >From: Mario Henley Becerril Geldis <[EMAIL PROTECTED]> >Reply-To: "Tomcat Developers List" <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: java jdbctest >Date: Thu, 18 Jul 2002 15:17:20 -0500 (CDT) > > > > javac jdbctest.java run fine, but when i try java jdbctest, this say: > > Exception in thread "main" java.lang.NoClassDefFoundError: jdbctest > > my >CLASSPATH=/usr/local/source/oraInventory/jdbc/lib/classes12.jar: >/usr/local/source/oraInventory/jdbc/lib/nls_charset12.jar: >/usr/java/j2sdk1.4.1/lib/tools.jar:/usr/java/j2sdk1.4.1/jre/lib/rt.jar: >/usr/local/tomcat/common/lib/servlet.jar:/usr/java/j2re1.4.1/lib > > > my code: > > import java.sql.*; > import java.io.*; > import java.util.Date; > class JdbcTest > { > > public static void main (String args []) > > throws SQLException, IOException > > { > > System.out.println ("Loading Oracle driver"); > > try > > { > Class.forName ("oracle.jdbc.driver.OracleDriver"); > > } > > catch (/*ClassNotFound*/ Exception e) > > { > > System.out.println ("Could not load the driver"); > > e.printStackTrace (); > > } > > System.out.println ("Connecting to the local database"); > > > Connection conn = > > DriverManager.getConnection > ( > "jdbc:oracle:thin:@myserver:1521:example", > "example", // ## fill in User here > "example" // ## fill in Password here > ); > > > System.out.println ("OK"); > Statement stmt = conn.createStatement (); > > // Query the employee names > > ResultSet rset = stmt.executeQuery ("SELECT field1 From >TDFDF97_NL"); > > while (rset.next ()) > > { > > // Print the name out > > System.out.println (rset.getString (1)); > > } > } > >} > > > > any ideas..??? > > >-- >To unsubscribe, e-mail: ><mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>