This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Mock Exam Question Doubt, 36: 74 from K&B CD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Mock Exam Question Doubt, 36: 74 from K&B CD" Watch "Mock Exam Question Doubt, 36: 74 from K&B CD" New topic
Author

Mock Exam Question Doubt, 36: 74 from K&B CD

Robert Elbourn
Ranch Hand

Joined: Oct 15, 2007
Posts: 69
Its the Music Player project on the Unix system:
consisting of the following files:

/mp/player/MusicPlayer.java
/mp/classes/player/MusicPlayer.class
/mp/jars/mp.jar
inside mp.jar file the structure is:
player/MusicPlayer.java
player/MusicPlayer.class
You are currently in the directory
/mp
and the CLASSPATH is set to /mp/jars

What command(s) can you use to invoke the class player.MusicPlayer?

Correct Answer:

java -cp classes player.MusicPlayer
java - cp /mp/jars/cp.jar player.MusicPlayer


Wait a minute... cp.jar ? I spotted that and left it out, no way will that run!!! and I got the q wrong... can anyone confirm this?
Kelvin Chenhao Lim
Ranch Hand

Joined: Oct 20, 2007
Posts: 513
Hi Robert,
Yes, that's a known error in the Master Exam. So don't worry, Java's not performing some esoteric magic filename translation here.


SCJP 5.0
Robert Elbourn
Ranch Hand

Joined: Oct 15, 2007
Posts: 69
thanks for the response!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mock Exam Question Doubt, 36: 74 from K&B CD