how to change classpath settings

iam  writing   some jsp's, servlet's, javabeans
iam using NetBeansIDE3.6 ,  it is shipped with tomcat  5.1 server.  Till now,i've used
JDBC - ODBC Bridge Driver.  Now  i Want to use   OracleDriver.  i've copied the  corresponding classes111.jar  and classes12.jar  into   common folder of TOMCAT  installation directory.  But iam getting  ClassNotFoundException if i use The Statement
class.forName("oracle.jdbc.OracleDriver"); in  my jdbc program.

And also  i wanted use OracleResultSet,.  it is unable to compile my  java file.
And the NetBeansIDE is showing  Red mark as some mistake is there in this line

Please let me Know how to use OracleDriver and  Oracle API. How to Change the CLASSPATH settings to include Oracle jar files.

sdushyanthAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TimYatesCommented:
you just need classes12.zip

copy it into the shared/lib directory
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
girionisCommented:
First of all make sure that the OracleDriver class is in the oracle.jdbc package. Second try moving the jar files into your /lib folder of your web app (should be in the /WEB-INF folder) and see if you still can't access the class.

To use the OracleResultSet make sure that the CLASSPATH is set correctly. TO do that you can try (assumign *nix)

javac -classpath $CLASSPATH:<path to OracleResutlSet> <your java class>.java
0
TimYatesCommented:
Errr...  in tomcat? ;-)
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

girionisCommented:
What about Tomcat?
0
TimYatesCommented:
Sorry...ignore me...  I wasn't thinking :-(

/me runs off and hides...
0
girionisCommented:
:)
0
kupra1Commented:
you need to add not only the classes12.zip in the lib folder but also you have to set the path of the zip file in the lib folder like this:
../../lib/classes12.zip (make sure to add the zip filename in the path)
It will take care of your Oracle driver too.
Finally, you can use the Oracle Resultset by using the following command:

javac -classpath $CLASSPATHOracleResutlSetpath TestOracleResultSet.java
0
TimYatesCommented:
> you need to add not only the classes12.zip in the lib folder but also you have to set the path of the zip file in the lib folder like this:

?
0
kupra1Commented:
i meant if you want to add the classes12.zip in the folder, do something like this on the command prompt:

set classpath=%classpath%;C:/tomcat/webapps/mywebapp/WEB-INF/lib/classes12.zip;

and not only
set classpath=%classpath%;C:/tomcat/webapps/mywebapp/WEB-INF/lib.

0
girionisCommented:
I'd say split the points between all participants.
0
kupra1Commented:
i agree with girionis.:)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.