You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2003/01/30 17:39:01 UTC
DO NOT REPLY [Bug 16604] New: -
Java task classpath problems on JDK 1.2 and Windows 9x
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=16604>.
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=16604
Java task classpath problems on JDK 1.2 and Windows 9x
Summary: Java task classpath problems on JDK 1.2 and Windows 9x
Product: Ant
Version: 1.5.1
Platform: PC
OS/Version: Windows 9x
Status: NEW
Severity: Normal
Priority: Other
Component: Core tasks
AssignedTo: ant-dev@jakarta.apache.org
ReportedBy: edwin@woudt.nl
The java task does not work correctly if a classpath is specified and when it
is executed on JDK 1.2 and Windows 9x.
The following is the output:
[java] Executing 'C:\JAVA\JDK12\JRE\bin\java.exe' with arguments:
[java] '-classpath'
[java] 'C:\Devel\cryptix\projects\openpgp\build\classes;C:\Devel\cryptix\project
s\openpgp\lib\junit.jar;C:\Devel\cryptix\projects\openpgp\lib\cryptix-jce-
api.jar;C:\Devel\cryptix\projects\openpgp\lib\cryptix-jce-provider.jar'
[java] 'cryptix.test.Test'
[java] 'openpgp'
[java]
[java] The ' characters around the executable and arguments are
[java] not part of the command.
[java] java.lang.NoClassDefFoundError:
C:\Devel\cryptix\projects\openpgp\lib\junit/jar
[java] Exception in thread "main"
For this particular combination of JDK version and windows version, the
batchfile antRun.bat is used to run the command. I added an echo statement to
this batchfile to see the command line it generated. This was the result:
C:\JAVA\JDK12\JRE\bin\java.exe -classpath
C:\Devel\cryptix\projects\openpgp\build\classes
C:\Devel\cryptix\projects\openpgp\lib\junit.jar
C:\Devel\cryptix\projects\openpgp\lib\cryptix-jce-api.jar
C:\Devel\cryptix\projects\openpgp\lib\cryptix-jce-provider.jar
cryptix.test.Test openpgp
As you can see the semicolons between the various elements of the classpath are
missing and replaced by a space. This is because apparently windows treats
semicolons on the command line as parameter separators.
The solution is to add quotes around the classpath when calling the batchfile.
The attached patch should do the trick (unfortunately I could not get ant to
build on my machine, thus was unable to test it).
---------------------------------------------------------------------
To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ant-dev-help@jakarta.apache.org