• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

set CLASSPATH?

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic