• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic