lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrzej Bialecki ...@getopt.org>
Subject Re: Find version of Lucene library
Date Wed, 09 Mar 2005 12:20:04 GMT
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message