ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: pathelement triggers NoClassDefFoundError: com/sun/net/ssl/internal/ssl/Provider
Date Sat, 22 Oct 2011 05:13:48 GMT
Hi Michael,

On 2011-10-21, Michael B Allen wrote:

> I'm posting this to dev instead of users because my best guess is that
> this is a bug.

Probably not.

> Consider the following target which runs a Java program MakeFoo.class:

> <target name="foo">
>     <java classname="MakeFoo">
>         <classpath>
>             <pathelement location="."/>
>         </classpath>
>         <arg line="-o foo -d 'maken some foo'"/>
>     </java>
> </target>

> This generates the following exception:

> $ ant foo
> Buildfile: /some/path/to/build.xml

> foo:
>      [java] java.lang.NoClassDefFoundError:
> com/sun/net/ssl/internal/ssl/Provider
>      [java]     at
>      [java] Java Result: -1

> Java and Ant versions are pretty much the latest:

> If I remove the pathelement directive, the build works.

If you don't specify the <classpath> explicitly your Java process runs
with the same CLASSPATH that is used by Ant internally - which includes

If you specify it, then you only get what you have asked for (unless you
fiddle with the build.sysclasspath property), or close to it.  I think
it should work if you explicitly add

<pathelement path="${java.class.path}"/>

if you don't like hardcoding jsse.jar (which you could address relative
to ${java.home}).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message