From owner-freebsd-java Tue Jul 31 8:37:14 2001 Delivered-To: freebsd-java@freebsd.org Received: from mail.xmission.com (mail.xmission.com [198.60.22.22]) by hub.freebsd.org (Postfix) with ESMTP id D0B4237B401 for ; Tue, 31 Jul 2001 08:37:11 -0700 (PDT) (envelope-from glewis@misty.eyesbeyond.com) Received: from [166.70.2.168] (helo=misty.eyesbeyond.com) by mail.xmission.com with esmtp (Exim 3.22 #1) id 15Rba2-0003Bf-00; Tue, 31 Jul 2001 09:37:11 -0600 Received: (from glewis@localhost) by misty.eyesbeyond.com (8.11.3/8.11.3) id f6VFb5o48461; Wed, 1 Aug 2001 01:07:05 +0930 (CST) (envelope-from glewis) Date: Wed, 1 Aug 2001 01:07:05 +0930 From: Greg Lewis To: Joe Shevland Cc: Greg Lewis , freebsd-java@FreeBSD.ORG Subject: Re: Class.getPackage() returning null Message-ID: <20010801010705.A48428@misty.eyesbeyond.com> References: <20010731150252.A47111@misty.eyesbeyond.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from jshevland@deloitte.com.au on Tue, Jul 31, 2001 at 03:48:14PM +1000 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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