DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4372>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4372 Javac task always generates optional -sourcepath switch [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[EMAIL PROTECTED] Status|RESOLVED |REOPENED OS/Version|Windows NT/2K |MacOS X Priority|Other |High Platform|PC |All Resolution|INVALID | Version|1.4 |1.4.1 ------- Additional Comments From [EMAIL PROTECTED] 2001-12-19 11:34 ------- Sorry, this is a bug. I too ran into this after switching from jikes to standard javac. Works properly with jikes, not with javac. The documentation for javac in the section for "searching for types" says ( http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/javac.html ) " If you use the -sourcepath option, the compiler searches the indicated path for source files; otherwise the compiler searches the user class path both for class files and source files. " Example: Suppose I have: thatpackage/ThatClass.java and thispackage/ThisClass.java which include an import "thatpackage.ThatClass"; ... ThatClass that = new ThatClass(); Then invoking javac as javac -classpath "thispackage:thatpackage" thispackage/ThisClass.java would implicitly look for the source thatpackage/ThatClass.java in the classpath during attempt to resolve the reference of ThatPackage.ThatClass from ThisPackage.ThatClass.java when it found that the thatPackage/ThatClass.class was missing. if invoked as the javac task does: javac -sourcepath "thispackage" -classpath "thispackage:thatpackage" thispackage/ThisClass.java a compiler error results complaining about not being able to resolve uses of ThatPackage.ThatClass within ThisPackage.ThisClass. This is because javac will NOT look for the source ThatClass.java anywhere but the specified sourcepath. That the bug. Jason Winshell, Principal Consulting Engineer [EMAIL PROTECTED] Bear River Associates, Inc. http://www.bearriver.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
