Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#3 Exception with ANT 1.5.1 and JDK 1.4.1

closed-fixed
nobody
None
5
2002-11-07
2002-10-31
Karl ROUSSEAU
No

When I run the wonderful jarg in a console using the
SUN JDK 1.4.1, it works fine but when I use ANT over
SUN JDK 1.4.1, it fails with this exception:
[java] The args attribute is deprecated. Please use
nested arg elements.
[java] Running in same VM Executing 'jarg.Jarg' with
arguments:
[java] '-nornm'
[java] '-nornc'
[java] '../lib/temp.jar'
[java]
[java] The ' characters around the executable and
arguments are
[java] not part of the command.
[java] java.lang.NoClassDefFoundError:
sun/reflect/ConstructorAccessorImpl

The same script is running fine with SUN/IBM JDK 1.3.1
on my PC (dual-pIII) with NT 2000sp2.
My batch command is:
@d:\j2sdk1.4.1\bin\java -classpath D:\j2sdk1.4.1
\lib\tools.jar;..\lib\jarg.jar;D:\idea647\lib\ant.jar;D:\idea647
\lib\optional.jar;D:\idea647\lib\xalan.jar
org.apache.tools.ant.Main -buildfile script.xml deploy -
verbose
(I use the IDE called IdeaJ which is holding my ant but
this exception is nothing to do with this IDE,I am just
using the packages)

As we are moving our software on JDK 1.4.1, I hope this
is nothing to fix ...

Discussion

  • Karl ROUSSEAU
    Karl ROUSSEAU
    2002-11-07

    • status: open --> closed-fixed
     
  • Karl ROUSSEAU
    Karl ROUSSEAU
    2002-11-07

    Logged In: YES
    user_id=342679

    I found the solution by myself ;-)

    In fact, ANT is having a problem with the JDK 1.4.x and when you use the
    java command with a tool like JARG, you need to put the parameter "fork"
    to true. Like :
    <java classname="jarg.Jarg" args="${deploy-dir}/temp.jar" fork="true">
    That's it. This bug is not on your side.