Bug#267853: ant: bug when symlinking jre/lib/ext with Sun's j2sdk1.4

Stefan Gybas Stefan Gybas <sgybas@debian.org>, 267853@bugs.debian.org
Wed Aug 25 01:39:02 2004


This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig4ACF92927DADF432A432A7F0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

tags 267853 wontfix
thanks

Morten Werner Olsen wrote:

> I have a problem with ant when installing Sun's j2sdk1.4 (for
> installation procedure, se item 1 in [1]). The problem seems to be
> related to that I symlink /usr/lib/j2sdk1.4-sun/jre/lib/ext to
> /usr/share/java. If I don't use this symlink, ant works ok:

Why are you creating the symlink? You really should not do this:

1. There might be conflicting versions of JARs in /usr/share/java, e.g.
    commons-collections 2.x and 3.x and you don't know which one comes
    first in the class path. The same happens for multiple JAXP-compilant
    XML parsers in /usr/share/java.

2. The extension directory is - as the name implies - for JRE
    extensions, like a library for accessing serial ports or a custom
    debugger/profiler. JARs in this directory are loaded by a special
    class loader because they might need additional privileges, e.g. to
    access JVM internals. "Normal" classes should be loaded by the
    default class loader.

> I assume that the bug is in ant, because other java-applications I use
> works just fine.

It's not a bug! Ant uses its own class loader which causes trouble when 
some of Ant's classes or loaded by the special "extension class loader".

Stefan

--------------enig4ACF92927DADF432A432A7F0
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBLD5MCdoSgNrrJGsRAjvJAJ9YShM1+X7EvySVJ4qRKrr0U72CwgCdH0GU
0kK6krvuJnaDlwCz4e7z6oA=
=jDGS
-----END PGP SIGNATURE-----

--------------enig4ACF92927DADF432A432A7F0--