setting path for oracle classes

im having my java and oracle installed in c:

java - C:\j2sdk1.4.2_03

oracle - C:\oracle\cli92\jdbc\doc\

i want to set path to access the above zip classes from the java prg.

can somebody tell me how to do this

Who is Participating?
objectsConnect With a Mentor Commented:
Copy the driver jar to your jre(s) 'ext' directory and it will automatically get included in your classpath
zzynxSoftware engineerCommented:
This seems a documentation file, not a jar one.
If you want to reach this zip file (maybe for accessing the information in it) you can instruct your program to see this directory (maybe the path).
7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

I think you want oracle database driver to make a connection to oracle from java program.

For that you have to use C:\oracle\ora92\jdbc\lib\ojdbc14.jar

There are  2 ways to put into classpath.
1) you set into system properties by adding

2) when you start program pass into parameter
java -classpath C:\oracle\ora92\jdbc\lib\ojdbc14.jar MyJavaProgram

hope this helps, else mention more detail.
vihar123Author Commented:
thanks for the responses, actually when im running my prg its giving me an error called as
java.lang.NoClassDefFoundError: oracle/jdbc2/Clob

when i checked in the internet, the solution provided was that i shld open the oracle directory and in it the jdbc and in it i find many zip files and these i shld include them in the classpath

so i tried something like

SETPATH = %C:\j2sdk1.4.2_03\jre\lib\ext;C:\oracle\cli92\jdbc\lib%PATH%

but nothing is getting included when im checking out my classpaths through my ide

so basically i want my prg to access this lib folder in the oracle directory
zzynxSoftware engineerCommented:
>> SETPATH = %C:\j2sdk1.4.2_03\jre\lib\ext;C:\oracle\cli92\jdbc\lib%PATH%
You certainly mean
     SET PATH = C:\j2sdk1.4.2_03\jre\lib\ext;C:\oracle\cli92\jdbc\lib;%PATH%

>> but nothing is getting included when im checking out my classpaths through my ide
What ide do you use?
If it's netBeans you should mount all the jar's you need ( Right-click File Systems > Mount > Archive Files )

vihar123Author Commented:
im using an ide called javabeginner
zzynxSoftware engineerCommented:
Don't know that one.
But often an IDE doesn't "follow" the usual path settings and uses its own way of setting the paths...
vihar123Author Commented:
thanks i could solve it, i have just copied all the files to the ext folder and its working fine

thanks objects
no worries :)
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.

All Courses

From novice to tech pro — start learning today.