ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <profk...@yahoo.com>
Subject RE: AW: AW: two diff't JDKs
Date Mon, 27 Oct 2003 20:57:21 GMT

--- "Brown, Michael (Denver)" <Michael_Brown@jdedwards.com> wrote:
> Erik,
> 
> This is usually attributed to a space in the path issue.  If anywhere
> in
> your arguments there is a path with a space then you have to handle
> that
> by quoting the path or using the short name format.  You can find
> this
> in the using the dos command c:>dir /X
> 	
> 	       This displays the short names generated for non-8dot3
> file
>              names.  The format is that of /N with the short name
> inserted
>              before the long name. If no short name is present,
> blanks
> are
>              displayed in its place.
> 
> Again, hope this helps.  If it is not the reason then you might want
> to
> get more -debug information and send that out to see what we can do
> to
> help.
> 
> Mike B.


Mike,

An unescaped space was my first guess, too -- it looks almost as though
the command that Ant is executing to the DOS shell isn't well-formed
somehow.  It would seem most likely that the unescaped space is in one
of my arguments, as you suggest, but if so then I just can't find it
anywhere.  When I run Ant in -verbose mode so that I can see exactly
what is happening, I find the following amidst numerous warnings about
using C:\com\foo instead of C:/com/foo:

    [javac] Compiling 1336 source files to
C:\newdist\mswp-2a\build\classes
    [javac] Using external javac compiler
    [javac] Compilation arguments:
    [javac] '-d'
    [javac] 'C:\newdist\mswp-2a\build\classes'
    [javac] '-classpath'
    [javac]
'C:\newdist\mswp-2a\build\classes;C:\newdist\mswp-2a\lib\borland.jar;C:\newdist\mswp-2a\lib\classes12.zip;C:\newdist\mswp-2a\lib\jaxp.jar;C:\newdist\mswp-2a\lib\junit.jar;C:\newdist\mswp-2a\lib\parser.jar;C:\newdist\mswp-2a\lib\rmiStub_Skel.jar;C:\newdist\mswp-2a\lib\servlet.jar;C:\newdist\mswp-2a\lib\swingall.jar;C:\newdist\mswp-2a\lib\vbjapp.jar;C:\newdist\mswp-2a\lib\vbjcosev.jar;C:\newdist\mswp-2a\lib\vbjcosnm.jar;C:\newdist\mswp-2a\lib\vbjgk.jar;C:\newdist\mswp-2a\lib\vbjorb.jar;C:\newdist\mswp-2a\lib\vbjtools.jar;C:\newdist\mswp-2a\lib\xml4j_1_1_9.jar;C:\newdist\tools\jdk\1.3.0_02\lib\tools.jar;C:\code\apache-ant-1.5.4\lib\xml-apis.jar;C:\code\apache-ant-1.5.4\lib\xercesImpl.jar;C:\code\apache-ant-1.5.4\lib\optional.jar;C:\code\apache-ant-1.5.4\lib\ant.jar'
    [javac] '-g:none'
    [javac] 
    [javac] The ' characters around the executable and arguments are
    [javac] not part of the command.

And then it lists all of the files it's about to compile, at which
point it gets to the very end and then ends with the "-g:none" argument
error.

Then I tried putting singlequotes around the value of "executable" in
the <javac> task to see if that changed anything (even though my
compiler doesn't have any spaces in its path).  In fact, it did change
-- no longer do I get the message about the "-g:none" compiler
argument, but at that exact same point the -verbose output just stops
abruptly.  The console stack trace, however, is much longer (and note
the interesting part at the very last line):

C:\newdist\mswp-2a>ant -verbose > antoutput.log

BUILD FAILED
file:C:/newdist/mswp-2a/build.xml:30: Error running
'C:\newdist\tools\jdk\1.1.8\
bin\javac' compiler
        at
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.execut
eExternalCompile(DefaultCompilerAdapter.java:451)
        at
org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacEx
ternal.java:81)
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)
--- Nested Exception ---
java.io.IOException: CreateProcess:
'C:\newdist\tools\jdk\1.1.8\bin\javac' -d C:
\newdist\mswp-2a\build\classes -classpath
C:\newdist\mswp-2a\build\classes;C:\ne
wdist\mswp-2a\lib\borland.jar;C:\newdist\mswp-2a\lib\classes12.zip;C:\newdist\ms
wp-2a\lib\jaxp.jar;C:\newdist\mswp-2a\lib\junit.jar;C:\newdist\mswp-2a\lib\parse
r.jar;C:\newdist\mswp-2a\lib\rmiStub_Skel.jar;C:\newdist\mswp-2a\lib\servlet.jar
;C:\newdist\mswp-2a\lib\swingall.jar;C:\newdist\mswp-2a\lib\vbjapp.jar;C:\newdis
t\mswp-2a\lib\vbjcosev.jar;C:\newdist\mswp-2a\lib\vbjcosnm.jar;C:\newdist\mswp-2
a\lib\vbjgk.jar;C:\newdist\mswp-2a\lib\vbjorb.jar;C:\newdist\mswp-2a\lib\vbjtool
s.jar;C:\newdist\mswp-2a\lib\xml4j_1_1_9.jar;C:\newdist\tools\jdk\1.3.0_02\lib\t
ools.jar;C:\code\apache-ant-1.5.4\lib\xml-apis.jar;C:\code\apache-ant-1.5.4\lib\
xercesImpl.jar;C:\code\apache-ant-1.5.4\lib\optional.jar;C:\code\apache-ant-1.5.
4\lib\ant.jar -g:none @C:\newdist\mswp-2a\files1890397665 error=2


I can't figure out where that "files1890397665 error=2" line is coming
from.  Does anyone know what part of the Ant source handles this?  I
can try to investigate where it's coming from.

For the record, the relevant part of my build.xml is:

    <!-- from build.properties
         src.dir=src
         build.classes.dir=build/classes
         compiler.1.1='C:/newdist/tools/jdk/1.1.8/bin/javac' -->

    <javac
        srcdir="${src.dir}"
        sourcepath=""
        destdir="${build.classes.dir}"
        fork="yes"
        executable="${compiler.1.1}">

      <classpath refid="compile.classpath"/>
      <include name="com/foo/framework/**/*.java"/>
      <include name="com/foo/adminclient/**/*.java"/>
      <include name="com/foo/client/**/*.java"/>
      <include name="com/foo/common/**/*.java"/>
      <include name="com/foo/foundation/**/*.java"/>
        
    </javac>





Thanks for being so helpful!


Erik

=====
-- 
Copyright.  Copy right.
The right to copy.  That's all it is.
Contrary to popular belief, there's no such thing as intellectual "property".

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message