• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CLASSPATH .... please help me

 
ankur rathi
Ranch Hand
Posts: 3830
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5093
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3830
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can any body please post some question or example for that ...

thanks .
 
Nart
Ranch Hand
Posts: 95
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello rathi,

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

http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/classpath.html

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

http://java.sun.com/j2se/1.5.0/docs/tooldocs/findingclasses.html

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...

Nart
[ March 04, 2005: Message edited by: Nart Seine ]
 
ankur rathi
Ranch Hand
Posts: 3830
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 My.java

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 My.java
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 My.java
or
c:/ set classpath = c:\myFolder\my.jar;
c:/ javac My.java

----------------

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

c:/ javac -classpath c:\myFolder my.app.Cool My.java
c:/ set classpath=c:\myFolder my.app.Cool;
c:/ javac My.java

-----------------


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
Posts: 91
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
drifter
Ranch Hand
Posts: 1364
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
M Rama,

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

Beta Exam

The last day for the beta exam is March 6.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic