Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 268 invoked from network); 3 Apr 2000 21:26:05 -0000 Received: from out5.prserv.net (HELO prserv.net) (32.97.166.35) by locus.apache.org with SMTP; 3 Apr 2000 21:26:05 -0000 Received: from SUCCUBUS ([32.100.221.11]) by prserv.net (out5) with SMTP id <20000403212547243039kmpce>; Mon, 3 Apr 2000 21:25:47 +0000 Message-ID: <007901bf9db3$278b4a50$0200a8c0@SUCCUBUS> Reply-To: "Scott M Stark" From: "Scott M Stark" To: References: <852568B6.0071AADE.00@d54mta04.raleigh.ibm.com> Subject: Bug in absolute classpath on Windows OS Date: Mon, 3 Apr 2000 14:25:35 -0700 Organization: Displayscape.com MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N If I specify an absolute classpath as below in the compile-test target and run this on Win2000 I see the path get translated to one relative to the project basedir and subsequently thrown out because it does not exist. The problem is that when the Project.resolveFile(String) only looks for the unix style absolute path: Project.java:413 if (fileName.startsWith("/")) return new File( fileName ); The Javac.compileClasspath value that is passed to Project.revolveFile(String) from within the Javac.addExistingToClasspath(StringBuffer ,String ) method is translated to the native OS path of "\usr\local\Java\packages" when the compileClasspath property was set in Javac.setClasspath(String). Shouldn't java.io.File object be used in place of String paths to avoid having to keep track of what path delimiters are being used? bash-2.02$ ant.bat -verbose -f tstbuild.xml compile-test ... Build sequence for target `compile-test' is [init, build, compile-test] Complete build sequence is [init, build, compile-test] Executing Target: init Executing Target: build Executing Target: compile-test classpath=/usr/local/Java/packages:. Compiling 1 source files to D:\usr\local\src\scott_home_rips\packages\build\classes Using classic compiler Dropping from classpath: D:\usr\local\src\scott_home_rips\packages\usr\local\Java\packages Compilation args: [-d, D:\usr\local\src\scott_home_rips\packages\build\classes, -classpath, D:\usr\local\src\scott_home_rips\packages\build\classes;D:\usr\local\src\scott_home_rips\packages;D:\usr\local\Java\Ant\jakarta-ant\ build\classes;D:\usr\local\Java\Ant\jakarta-ant\dist\lib\xml.jar;D:\usr\local\Java\jdk1.2.2lib\tools.jar;D:\usr\local\Java\Ant\ant, -sourcepath, D:\usr\local\src\scott_home_rips\packages, -g] Files to be compiled: D:\usr\local\src\scott_home_rips\packages\com\bear\racs\net\RFSnapDispatcher.java D:\usr\local\src\scott_home_rips\packages\com\bear\racs\net\RFSnapDispatcher.java:7: Class com.objectspace.jgl.BinaryPredicate not found in import. import com.objectspace.jgl.BinaryPredicate; ... many more errors because of bad classpath...