This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Class's #getPackage() returns null - (old) bug?
- From: Andrew Haley <aph at redhat dot com>
- To: Martin Egholm Nielsen <martin at egholm-nielsen dot dk>
- Cc: java at gcc dot gnu dot org
- Date: Mon, 8 Aug 2005 14:05:10 +0100
- Subject: Re: Class's #getPackage() returns null - (old) bug?
- References: <dcve6g$3vs$1@sea.gmane.org>
Martin Egholm Nielsen writes:
> Hi there,
>
> I just tried the following:
>
> --- 8< 8< 8< ---
> package men.gcjpackage;
>
> public class TestPackage
> {
> public static void main(String[] args)
> {
> System.out.println("ClassLoader: " +
> TestPackage.class.getClassLoader() );
> System.out.println("Package: " + TestPackage.class.getPackage());
> } // main
> } // TestPackage
> --- 8< 8< 8< ---
>
> I would expect the #getPackage to return "something" else but null - but
> nevertheless I get:
>
> # ./testpackage
> ClassLoader: gnu.gcj.runtime.VMClassLoader@10074fc0
> Package: null
>
> This may have to do with the fact that I run an old GCJ - 3.4.3...
Indeed. Feel free to try this with trunk or 4.0.
Andrew.