This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes classpath is not correctly specified in Question #11, Self Test of Chapter 10 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "classpath is not correctly specified in Question #11, Self Test of Chapter 10" Watch "classpath is not correctly specified in Question #11, Self Test of Chapter 10" New topic
Author

classpath is not correctly specified in Question #11, Self Test of Chapter 10

Lianqi Li
Greenhorn

Joined: Mar 05, 2010
Posts: 1
The answer says A is correct

A. javac -classpath MyJar.jar GetJar.java
java GetJar
B. javac MyJar.jar GetJar.java
java GetJar
C. javac -classpath MyJar.jar GetJar.java
java -classpath MyJar.jar GetJar
D. javac MyJar.jar GetJar.java
java -classpath MyJar.jar GetJar

But actually none of the above is correct.

The correct one should be a E

E. javac -classpath MyJar.jar GetJar.java
java -classpath MyJar.jar:. GetJar
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: classpath is not correctly specified in Question #11, Self Test of Chapter 10
 
Similar Threads
Chapter 10 K&B Self Test Question 11 Help
Chapter 10 Question 11 of SCJP K and B
K&B doubt regarding question in Development chapter
chapter 10 question number 11 k&b book (on jar files)
Mistake in GuideBook for SCJP Java 6.0, Chapter 10, Self Test question 11