Re: [External] Re: Can lucene be used in Android ?

2022-09-12 Thread Uwe Schindler
That is exactly as said: Lucene main branch is our development branch 
and will possibly be branched as Lucene 10, this branch is currently at 
Java 17 minimum.


For current releases of Apache Lucene 9, we use a separate branch 
"branch_9x" where we cherry-pick stuff. This branch runs with Java 11 
minimum (but of course runs also with 17 or later; when Java 19 is out 
we will also have a Multi-Release JAR file with the MMapDirectory IO 
implementation based on Java Project Panama).


branch_8x is in a completely different repository (together with Apache 
Solr) and updated seldomly now (by cross-repo cherry-picking).


Uwe

Am 12.09.2022 um 02:23 schrieb Shifflett, David [USA]:

Hi Uwe,

I am a little confused by your 2 statements.


Lucene 9.x series requires JDK 11 to run
The main branch is already on JDK 17

Will Lucene 9.x run on JDK 17?
Is 9.x 'the main branch'?

Thanks,
David Shifflett
Senior Lead Technologist
Enterprise Cross Domain Solutions (ECDS)
Booz Allen Hamilton

On 9/10/22, 5:30 AM, "Uwe Schindler"  wrote:

 Hi Jie,

 actually the Lucene 9.x series requires JDK 11 to run, previous versions
 also work with Java 8. The main branch is already on JDK 17. From my
 knowledge, you may only use Lucene versions up to 8 to have at least a
 chance to run it. But with older Android version you may even need to go
 back to Lucene builds targetting JDK 7 (Lucene 5 ?, don't know).

 But this is only half of the story: Lucene actually uses many many
 modern JDK and JVM features that are partly not implemented in Dalvik.
 It uses MethodHandles instead of reflection and the Java 8+ version use
 lambdas which were not compatible with older Android SDKs.

 So in short: Use older version and hope, but we offer no support or are
 not keen to apply changes to Lucene so it can be used with Android at
 all - because Android is not really compatible to any Java spec like API
 or memory model.

 Uwe

 Am 09.09.2022 um 09:10 schrieb Jie Wang:
 > Hey,
 >
 > Recently, I am trying to compile the Lucene to get a jar that can be 
used in Android, but failed.
 >
 > Is there an official version that supports the use of Lucene on Android?
 >
 >
 > Thanks!
 > -
 > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
 > For additional commands, e-mail: java-user-h...@lucene.apache.org
 >
 --
 Uwe Schindler
 Achterdiek 19, D-28357 Bremen
 
https://urldefense.com/v3/__https://www.thetaphi.de__;!!May37g!I0Gu25Y3BgTV3Vu1HySs6-3CFpW6BoaYKIsxiSeaohtNPkf00opY-hSY8XMqPJz990oyteqdryrf1cToSA$
 eMail: u...@thetaphi.de


 -
 To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
 For additional commands, e-mail: java-user-h...@lucene.apache.org



-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org


--
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail: u...@thetaphi.de


-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org



Re: [External] Re: Can lucene be used in Android ?

2022-09-11 Thread Shifflett, David [USA]
Hi Uwe,

I am a little confused by your 2 statements.

> Lucene 9.x series requires JDK 11 to run
> The main branch is already on JDK 17

Will Lucene 9.x run on JDK 17?
Is 9.x 'the main branch'?

Thanks,
David Shifflett
Senior Lead Technologist
Enterprise Cross Domain Solutions (ECDS)
Booz Allen Hamilton

On 9/10/22, 5:30 AM, "Uwe Schindler"  wrote:

Hi Jie,

actually the Lucene 9.x series requires JDK 11 to run, previous versions 
also work with Java 8. The main branch is already on JDK 17. From my 
knowledge, you may only use Lucene versions up to 8 to have at least a 
chance to run it. But with older Android version you may even need to go 
back to Lucene builds targetting JDK 7 (Lucene 5 ?, don't know).

But this is only half of the story: Lucene actually uses many many 
modern JDK and JVM features that are partly not implemented in Dalvik. 
It uses MethodHandles instead of reflection and the Java 8+ version use 
lambdas which were not compatible with older Android SDKs.

So in short: Use older version and hope, but we offer no support or are 
not keen to apply changes to Lucene so it can be used with Android at 
all - because Android is not really compatible to any Java spec like API 
or memory model.

Uwe

Am 09.09.2022 um 09:10 schrieb Jie Wang:
> Hey,
>
> Recently, I am trying to compile the Lucene to get a jar that can be used 
in Android, but failed.
>
> Is there an official version that supports the use of Lucene on Android?
>
>
> Thanks!
> -
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
>
-- 
Uwe Schindler
Achterdiek 19, D-28357 Bremen

https://urldefense.com/v3/__https://www.thetaphi.de__;!!May37g!I0Gu25Y3BgTV3Vu1HySs6-3CFpW6BoaYKIsxiSeaohtNPkf00opY-hSY8XMqPJz990oyteqdryrf1cToSA$
  
eMail: u...@thetaphi.de


-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org