sunshine737
asked on
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\j avadoc.zip
i want to set path to access the above zip classes from the java prg.
can somebody tell me how to do this
thanks
java - C:\j2sdk1.4.2_03
oracle - C:\oracle\cli92\jdbc\doc\j
i want to set path to access the above zip classes from the java prg.
can somebody tell me how to do this
thanks
http://faq.javaranch.com/view?HowToSetTheClasspath
>C:\oracle\cli92\jdbc\doc\ javadoc.zi p
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).
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).
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\o jdbc14.jar
There are 2 ways to put into classpath.
1) you set into system properties by adding
CLASSPATH=.;..;other_jar_f iles.jar;C :\oracle\o ra92\jdbc\ lib\ojdbc1 4.jar
2) when you start program pass into parameter
java -classpath C:\oracle\ora92\jdbc\lib\o jdbc14.jar MyJavaProgram
hope this helps, else mention more detail.
For that you have to use C:\oracle\ora92\jdbc\lib\o
There are 2 ways to put into classpath.
1) you set into system properties by adding
CLASSPATH=.;..;other_jar_f
2) when you start program pass into parameter
java -classpath C:\oracle\ora92\jdbc\lib\o
hope this helps, else mention more detail.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks for the responses, actually when im running my prg its giving me an error called as
java.lang.NoClassDefFoundE rror: 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:\ora cle\cli92\ jdbc\lib%P ATH%
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
java.lang.NoClassDefFoundE
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\
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
>> SETPATH = %C:\j2sdk1.4.2_03\jre\lib\ ext;C:\ora cle\cli92\ jdbc\lib%P ATH%
You certainly mean
SET PATH = C:\j2sdk1.4.2_03\jre\lib\e xt;C:\orac le\cli92\j dbc\lib;%P ATH%
>> 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 )
You certainly mean
SET PATH = C:\j2sdk1.4.2_03\jre\lib\e
>> 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 )
ASKER
im using an ide called javabeginner
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...
But often an IDE doesn't "follow" the usual path settings and uses its own way of setting the paths...
ASKER
thanks i could solve it, i have just copied all the files to the ext folder and its working fine
thanks objects
thanks objects
no worries :)