Date: Wed, 1 Aug 2001 01:07:05 +0930 From: Greg Lewis <glewis@eyesbeyond.com> To: Joe Shevland <jshevland@deloitte.com.au> Cc: Greg Lewis <glewis@eyesbeyond.com>, freebsd-java@FreeBSD.ORG Subject: Re: Class.getPackage() returning null Message-ID: <20010801010705.A48428@misty.eyesbeyond.com> In-Reply-To: <NEBBKPJCEMMGFBLGLENGCENACFAA.jshevland@deloitte.com.au>; from jshevland@deloitte.com.au on Tue, Jul 31, 2001 at 03:48:14PM %2B1000 References: <20010731150252.A47111@misty.eyesbeyond.com> <NEBBKPJCEMMGFBLGLENGCENACFAA.jshevland@deloitte.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 31, 2001 at 03:48:14PM +1000, Joe Shevland wrote: > I'm using the patchset 10 version (java full version "jdk1.2.2-FreeBSD:root:2000/08/06-16:28") with the following test: > --- > package foo; > public class bar { > public static void main(String args[]) { > bar test = new bar(); > System.out.println("Package object is: "+test.getClass().getPackage()); > } > } > --- > > The getPackage() method above returns null; from the Javadocs: > > "Null is returned if no package object was created by the class loader of this class." > > I guess it should return a Package object as there's no complex class loader interactions or anything. The same test using JDK1.3 on M$ returns a valid package object. Thanks Joe. This does fail for me! I'll look into it. -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Mobile: 0419 868 494 Information Technology Web : http://www.eyesbeyond.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010801010705.A48428>