This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes javac question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "javac question" Watch "javac question" New topic
Author

javac question

Raphael Kou
Greenhorn

Joined: Oct 23, 2007
Posts: 13
K&B Book Chapter 10 Question 5


Given deault classpath:
/foo

Directory structure:
foo
|
test
|
xcom
|--A.class
|--B.java

And these two files:

package xcom;
public class A {}

package xam
public class B extends A { }

So the only right answer is:
Set the current directory to "test" then invoke
javac -classpath . xcom/B.java

But this answer looks also right for me:
Set the current directory to "xcom" then invoke
javac -classpath . B.java

Why is this answer false?
dolly shah
Ranch Hand

Joined: Jun 18, 2007
Posts: 383
here

May be this link will help you.


SCJP-1.5<br />SCWCD-1.4
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javac question
 
Similar Threads
difference b/w absolute path and relative paths
K&B Chapter 10, Self test doubt
Classpath Query
Classpath Related Question
Classpath - Question 1