Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes CLASSPATH .... please help me Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "CLASSPATH .... please help me" Watch "CLASSPATH .... please help me" New topic

CLASSPATH .... please help me

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
I am going to take tiger-beta exam tomorrow and still I am not getting confidence .
Anyway , can any body tell me , what needs to be done for the CLASS PATH objective ( 7.5 ) . Can any body post some thoughts on what question may come in exam for this objectives . I am very confuse in this objective . Because I never execute program from DOS prompt & never ever got problem of classpath . Yes but in some program , I have added some third party jars in classpath but it is very easy from WSAD . So please provide me some information that what exam expect from us ...

please help me .

Thanks a lot .
[ March 04, 2005: Message edited by: rathi ji ]
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
maybe you should have gotten in some practice with the commandline...
It's really rather simple.
Of course if you refer to is as "class path" rather than the correct term "classpath" there's little hope.

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
can any body please post some question or example for that ...

thanks .
Ranch Hand

Joined: May 28, 2002
Posts: 95
Hello rathi,

Here's the official classpath doc from Sun. Its in the SDK API docs.

Its the most basic intro on the subject. You also need to check this:

Those two links, with PRACTICE should suffice... if your using an IDE, quit it right NOW! and spend time practicing from the command-line. thats really the best tip i can give.

Good luck on your exam...

[ March 04, 2005: Message edited by: Nart Seine ]
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
What I get from this tutorial :

1] suppose you have some classes in c:\myFolder , and you want to take a reference of all the classes in your class then you can do this 2 thing :

for just compilation purpose :

c:/ javac -classpath c:\myFolder

for just execution purpose :

c:/ java -classpath c:\myFolder My

And if you want to set in class path for all time :

c:/ set classpath = c:\myFolder;

then you can compile & execution your class like this :

c:/ javac
c:/ java My


If you want to take a zip or jar file into class path , then you have to give its name also ( not just the folder name that contained this jar file , as we did in case of class - above one )

c:/ javac -classpath c:\myFolder\my.jar
c:/ set classpath = c:\myFolder\my.jar;
c:/ javac


If you have this Cool class in a package that is in myFolder & want to take reference :

c:/ javac -classpath c:\myFolder
c:/ set classpath=c:\myFolder;
c:/ javac


please correct me , if something is wrong .
is this sufficient for beta exam , or something else is needed . please put your comment ...

Thanks a lot .
M Rama
Ranch Hand

Joined: Mar 04, 2005
Posts: 91
Sorry, I am new here. Can someone tell me what the Tiger Beta exam is? Is this a prep for the SCJP exam?
Carol Enderlin
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
M Rama,

Java 2 Platform, Standard Edition 5.0, code- named "Tiger,"

Beta Exam

The last day for the beta exam is March 6.
I agree. Here's the link:
subject: CLASSPATH .... please help me
jQuery in Action, 3rd edition