File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: classpath is not correctly specified in Question #11, Self Test of Chapter 10