• 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

ClassPaths drive me nuts

 
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A systems classpath includes the following:
:C:\programs\limbo;C:\stuff\jars;C:\misc

We want to be able to run a program using the command:

java limbo.BlackBox

We have already created a valid BlackBox.class file. Where could we place a
copy of this file to enable us to run the program as specified?
A In directory C:\programs\limbo
B In directory C:\programs\limbo\classes
C In directory C:\misc
D In directory C:\misc\limbo
E In directory C:\misc\limbo\classes
F In directory C:\stuff\jars
G In a JAR file bb.jar located in directory C:\stuff\jars
H .jar located in directory C:\stuff\jars, with a relative path of
limbo/BlackBox.class within the JAR file

Ans shown as C.
1.my question why cant answer A be right??
2.Are there alot of classpth questions on the exam?
3. is there a site where I can read about classpath like a gentle introduction?
 
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think question looks incomplete from its language. It says "Where could we place a copy of this file to enable us to run the program as specified?", no where is written, file is copied to the specified directory along with its package (means whole folder is moved) or just class is copied.

As per your answer, it looks like whole folder is moved. In that case, F is also correct as there is no difference between C:\misc and C:\stuff\jars

Naseem
[ August 08, 2006: Message edited by: Naseem Khan ]
 
Onion rings are vegetable donuts. Taste this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic