aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes set CLASSPATH? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "set CLASSPATH?" Watch "set CLASSPATH?" New topic
Author

set CLASSPATH?

Sandra Baker
Greenhorn

Joined: Jul 10, 2002
Posts: 26
Hi, I have a question in regards to CLASSPATH.... according to Sun's documentation :
"....You only need to set the class path when you want to load a class that's (a) not in the current directory or in any of its subdirectories, and (b) not in a location specified by the extensions mechanism."
I have all my classes wrapped in the packages under scjd directory, so I guess I don't need to ask examiner set any classpath. Right? Here is my file structure:
E:\scjd\client (contains all client classes)
E:\scjd\db (contains all db classes)
E:\scjd\server (contains all server classes)
E:\scjd\service (contains all server interface classes)
So, if I ask the examiner to extract my main jar file under E:\scjd, JVM should be able to find all classes without any CLASSPATH set, am I correct on this? Please help....thanks
Thomas Fly
Ranch Hand

Joined: Sep 09, 2002
Posts: 164
Why not just try it yourself? Find another PC to install it on, if you need to.
If you can't follow your own instructions and make it work, then you're not ready to upload the assignment!


Fly by Night Consultants<br /> <blockquote><font size="1" face="Verdana, Arial">quote:</font><hr><i>I climbed on the back of a giant albatross<br />which flew through a crack in the cloud<br />to a place where happiness reigned...<br />all year 'round<br />the music played ever so loudly!</i><p><a href="http://thomasfly.com/songs/Traffic/Hole_in_my_Shoe_qt.htm" target="_blank" rel="nofollow">Hole in My Shoe</a><hr></blockquote>
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi Sandra,
You should avoid requiring any environmental setup by the assessor at all costs. How do you tell him to set the CLASSPATH? Do you show how to do it in Unix C-shell, Unix Bourne shell, on Windows 98, Windows 2000, Linux? Well you get the point.
To avoid having to set the CLASSPATH you should create executable jar files for both client and server. All dependant classes should be in those jars so that the CLASSPATH won't matter.
Hope this helps,
Michael Morris


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Gurpreet Saini
Ranch Hand

Joined: Jun 09, 2002
Posts: 295
Hi morris,
As my client needs some files from db pack as well as my server needs files from db pack. So, you say to wrap up the respective files in thier respective exe jars , such that classpath does not bother. Am I right ?.
Thank you,
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi Gurpreet,

As my client needs some files from db pack as well as my server needs files from db pack. So, you say to wrap up the respective files in thier respective exe jars , such that classpath does not bother. Am I right ?.

Yep. Just put everything you need in both jars. As a matter of fact, except for the manifest file, my client and server jars were identical.
Hope this helps,
Michael Morris
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: set CLASSPATH?