wood burning stoves*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Classpath question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Classpath question" Watch "Classpath question" New topic
Author

Classpath question

Felix Tang
Greenhorn

Joined: Aug 15, 2006
Posts: 7
Q37 of the diagnostic test:

You want to execute a class named My.class in the package whiz.utilities.myapp. The path to that directory is

/java/MyPackages/whiz/utilities/myapp

Which command would you use to run the class?

A. java -classpath . /java/MyPackages/whiz/utilities/myapp My
B. java -classpath /java/MyPackages whiz.utilities.myapp.My
C. java -classpath . java.MyPackages.whiz.utilities.myapp.My
D. java -classpath ./java/MyPackages/whiz/utilities/myapp/My

Am I right to say the answer is B? You can't have a dot without the separator colon( right after it.
Milind Patil
Greenhorn

Joined: Oct 19, 2003
Posts: 26
Yes, Answer B is correct.


Milind B. Patil - SCJP-1.4, SCWCD-5.0, SCBCD-5.0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Classpath question