The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Oracle driver problem

Posted by G.Salai Sivamal on June 04, 2001 at 6:03 AM

> Hi,

> I wrote some code that connects to an Oracle database and grabs and displays an XML Clob. If, using Visual Cafe, I compile the project as an application that needs java.exe to run, it works fine. If I compile the project as a stand alone exe then I get a message that says

> java.lang.noClassDefFoundError: oracle/jdbc/driver/OracleDriver

> I also tried writing this using Visual J++ but that program doesn't seem to like the Clob datatype.

> Any idea why I can't get this to run as a stand alone application?

> Thanks in advance

> Kevin

Reply:
------

It doesn't matter what development tool, y are using ?

The classpath might not be set properly.

Set the directory path of the oracle directory.

Ex, C:/someName/oracle/jdbc/driver/OracleDriver...etc

Append the the CLASSPATH with C:/someName

while using the java.exe

y need to give as like,

java -cp .;%CLASSPATH%;C:/someName javaProgramName

regs,
Salai.G
www.icope.com






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us