ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50091] New: <java jar=".."> task referring to installed optional packages with nested <jvmarg value="-Djava.ext.dirs=.."/> fails with NoClassDefFoundError
Date Thu, 14 Oct 2010 08:52:17 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50091

           Summary: <java jar=".."> task referring to installed optional
                    packages with nested <jvmarg
                    value="-Djava.ext.dirs=.."/> fails with
                    NoClassDefFoundError
           Product: Ant
           Version: 1.8.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: anhalter42@gmx.net


Created an attachment (id=26174)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26174)
sample project to illustrate the problem

testcase:
I have two classes in two jars. Both jars are located in the lib directory.
Using 
<java jar="lib/main.jar" fork="true" failonerror="false" dir=".">
    <jvmarg value="-Djava.ext.dirs=&quot;lib&quot;"/>
</java>
fails with NoClassDefFoundError

Using deprecated syntax
<java jar="lib/main.jar" jvmargs="-Djava.ext.dirs=&quot;lib&quot;" fork="true"
failonerror="false" dir="."/>
works just fine.

On Windows platform the issue doesn't occur.

Seems to be a sequencing issue when building the commandline: -Djava.ext.dirs
has to preceed the -jar option.

Attached is a sample project to illustrate the problem.

My platform: Ubuntu Linux 10.4, 2.6.32-24-generic kernel, x86_64

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message