Mailing List Archive

Can lucene be used in Android ?
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Can lucene be used in Android ? [ In reply to ]
no, and I think it could be challenging to go the route of using
Dalvik/ART. Maybe you can run an actual JDK on Android? See
https://openjdk.org/projects/mobile/android.html

On Fri, Sep 9, 2022 at 9:27 AM Jie Wang <heuwangjie@gmail.com> wrote:
>
> 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-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Can lucene be used in Android ? [ In reply to ]
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-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
--
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail: uwe@thetaphi.de


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: [External] Re: Can lucene be used in Android ? [ In reply to ]
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" <uwe@thetaphi.de> 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-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
--
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://urldefense.com/v3/__https://www.thetaphi.de__;!!May37g!I0Gu25Y3BgTV3Vu1HySs6-3CFpW6BoaYKIsxiSeaohtNPkf00opY-hSY8XMqPJz990oyteqdryrf1cToSA$
eMail: uwe@thetaphi.de


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


???????????????????????????????????????????????????????????????????????F?V?7V'67&?&R?R???â?f?W6W"?V?7V'67&?&T?V6V?R?6?R??&p?f?"FF?F????6????G2?R???â?f?W6W"?V??V6V?R?6?R??&p?
Re: [External] Re: Can lucene be used in Android ? [ In reply to ]
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" <uwe@thetaphi.de> 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-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> --
> Uwe Schindler
> Achterdiek 19, D-28357 Bremen
> https://urldefense.com/v3/__https://www.thetaphi.de__;!!May37g!I0Gu25Y3BgTV3Vu1HySs6-3CFpW6BoaYKIsxiSeaohtNPkf00opY-hSY8XMqPJz990oyteqdryrf1cToSA$
> eMail: uwe@thetaphi.de
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
--
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail: uwe@thetaphi.de


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