ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remie Bolte <re...@backbase.com>
Subject Stuck with what seems to be a charset issue
Date Thu, 16 Apr 2009 13:06:44 GMT
Hi,

I'm experiencing an issue which i've not yet encountered and am not able to
resolve :(

Since we have multiple products building on multiple JDK versions, i've
created a macrodef to initialize the specific build using the appropriate
JDK version. This works fine with JDK 1.4, but not with JDK 1.5.

Below you will find the code that is used to invoke java and the ant build,

<java fork="true" maxmemory="1024m" failonerror="@{failonerror}"
    jvm="@{java.home}/bin/java"
    classname="org.apache.tools.ant.Main">
    <classpath>
        <fileset dir="@{ant.home}/lib/" includes="**/*.jar" />
        <pathelement location="${shared.dir}/tools/lib/ant-contrib.jar" />
        <pathelement location="@{java.home}/lib/tools.jar" />
    </classpath>
    <syspropertyset>
        <propertyref builtin="commandline" />
        <propertyref builtin="system" />
    </syspropertyset>
    <arg line='-buildfile "${macrodef.kickstart.productBuild}"' />
    <arg line='-Dbasedir="@{basedir}"' />
    <arg line='-Djava.home="@{java.home}"' />
    <arguments />
</java>

This produces the following error:

[java] Failed to load Main Class: org.apache.tools.ant.Main
[java] Java Result: 1

If I replace the "classname"  attribute with the "jar" attribute I get the
following error:

[java] java.lang.IllegalArgumentException: Null charset name
[java]     at java.nio.charset.Charset.lookup(Charset.java:417)
[java]     at java.nio.charset.Charset.isSupported(Charset.java:463)
[java] Exception in thread "main"
[java] Java Result: 1

I'm using ant 1.7.1

Cheers,

Remie

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message