Solved

setting path for oracle classes

Posted on 2004-09-23
10
337 Views
Last Modified: 2006-11-17
im having my java and oracle installed in c:

java - C:\j2sdk1.4.2_03

oracle - C:\oracle\cli92\jdbc\doc\javadoc.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
0
Comment
Question by:vihar123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 37

Expert Comment

by:zzynx
ID: 12134268
0
 
LVL 12

Expert Comment

by:Giant2
ID: 12135301
>C:\oracle\cli92\jdbc\doc\javadoc.zip
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).
0
 

Expert Comment

by:vorapranav
ID: 12135571
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
 CLASSPATH=.;..;other_jar_files.jar;C:\oracle\ora92\jdbc\lib\ojdbc14.jar

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.
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 92

Accepted Solution

by:
objects earned 250 total points
ID: 12138680
Copy the driver jar to your jre(s) 'ext' directory and it will automatically get included in your classpath
0
 

Author Comment

by:vihar123
ID: 12140779
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
0
 
LVL 37

Expert Comment

by:zzynx
ID: 12140816
>> 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 )


0
 

Author Comment

by:vihar123
ID: 12140832
im using an ide called javabeginner
0
 
LVL 37

Expert Comment

by:zzynx
ID: 12140840
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...
0
 

Author Comment

by:vihar123
ID: 12140882
thanks i could solve it, i have just copied all the files to the ext folder and its working fine

thanks objects
0
 
LVL 92

Expert Comment

by:objects
ID: 12140921
no worries :)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
web application structure 18 116
Java string replace 11 63
login form jsp example 2 53
eclipse console opening separately 2 38
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question