Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi. Using JDK1.3 and Tomcat 3.3,

Status
Not open for further replies.

cadbilbao

Programmer
Apr 9, 2001
233
ES
Hi.

Using JDK1.3 and Tomcat 3.3, I've got this piece of code into a servlet:

import java.sql.*;
...
Connection conn = null;
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection(
"jdbc:eek:racle:thin:mad:myserver:1521:SID",
"system",
"manager");

When starting Tomcat, I included into startup.bat:
set CLASSPATH=%CLASSPATH%;d:\orant\jdbc\classes111.zip (it exists)

But when executing the code, I get this error message:
ClassNotFoundException: oracle.jdbc.driver.OracleDriver

What am I doing wrong?

Thank you very much.
 
Unzip classes111.zip into directory /yourApplication/WEB-INF/classes and restart web server. Your code should find the Oracle driver now.

I don't believe java can look into a zip file. If it had been a jar file you would have put it into directory /yourApplication/WEB-INF/lib.

pfist
 
Java has no probelm looking into a zip file. Essentially a jar is a zip file just with a different extension and a structured layout, they both use the same compression algorithm.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top