aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes javac question from book unclear 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 "javac question from book unclear" Watch "javac question from book unclear" New topic
Author

javac question from book unclear

Mirka Ignjatovic
Greenhorn

Joined: Mar 09, 2007
Posts: 6
Chapter 10, question 10.

cd /foo
javac -classpath /foo/bar/biz/bing:/foo/bar MyClass.java

answer: Java file will be found in /foo/bar/biz/bing

What do classpath has with location og Java file?
Is it only for looking for class files that MyClass.java needs?


SCJP 5, March 2007
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Hi Mirka,

The question is "Which version will be used by javac" so the first hit will be used. /foo/bar/baz/bing is the first hit so it will be used.

Remember: javac searches the current directory by default.

Regards ...

Vassili ...
Mirka Ignjatovic
Greenhorn

Joined: Mar 09, 2007
Posts: 6
Question was, what -classpath has to do with searching for *.java files
classpath = "path of *.class"
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by mirka mirka:
Chapter 10, question 10...

Do you have a specific book in mind?


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Hello "mirka mirka"-

Welcome to JavaRanch.

On your way in you may have missed that we have a JavaRanch Naming Policy for displayed (screen) names. Your displayed name must consist of a first name (or an initial), a space, and a family name (in that order) and not be obviously fictitious. Since yours "mirka mirka", does not conform with it, please take a moment to change it, which you can do right here.

Posters with nonconforming displayed names will be locked out of JavaRanch after a few posts using those names.

Thanks
-Barry

(NR) - search tag


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Mirka Ignjatovic
Greenhorn

Joined: Mar 09, 2007
Posts: 6
ok, name changed.
Book is SCJP study guide exam 310-055 from K&B.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javac question from book unclear