PA wrote:

On Mar 09, 2005, at 11:30, Andrzej Bialecki wrote:

I'm not sure... I just tried to do Package.getPackage("org.apache.lucene") and got null, even though the manifest is present in the JAR.


Packages are only defined when their underlying class has been already loaded...

http://alt.textdrive.com/assets/public/docs/ java.lang.Package.cls.html#getPackage.String

Why don't you do it the other way around, e.g. pick a Lucene class and ask it for its package. That works for me.

Hmmm... doesn't want to work for me, though - I tried it also this way. It returns a non-null Package instance, but getImplementationVersion and any other version-related methods return null. And I'm pretty sure the manifest is there, and it contains the following values:


Name: org/apache/lucene
Specification-Title: Lucene Search Engine
Specification-Version: 1.9-rc1-dev
Specification-Vendor: Lucene
Implementation-Title: org.apache.lucene
Implementation-Version: build 2005-02-16
Implementation-Vendor: Lucene



--
Best regards,
Andrzej Bialecki
 ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to