# Can i run Android Mode with Java 17 features?

**URL:** <https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869>\
**Category:** Processing for Android\
**Created:** [February 13, 2026, 3:22am UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869 "2026-02-13T03:22:54Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![aiapps](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/aiapps/32/21731_2.png) [@aiapps](https://discourse.processing.org/u/aiapps)\
**Post date:** [February 13, 2026, 3:22am UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/1 "2026-02-13T03:22:54Z")

</div>

I’d like to launch my projects on Android, but unfortunately, I understand the Android mode isn’t compatible with Java 17. Are there any solutions?

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [February 13, 2026, 4:30pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/2 "2026-02-13T16:30:08Z")

</div>

Hello,

I see a related topic here:

> <https://github.com/processing/processing-android/issues/732>
>
> The Gradle dependencies of version: 7.2 (gradle-tooling) are not supported by JA…VA-17.
> (as given in: https://docs.gradle.org/current/userguide/compatibility.html)
> 
> JAVA-17 supports gradle versions 7.3 and higher. Due to this issue, the build is failing. Could you help me in rectifying this issue?
> @codeanticode

I asked ChatGPT your question and it responded:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/6/8/682df1dd5d485794d759db76c18a59ba6b7eaeaa.png)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/0/e0c067d671d5ba60103ed115c5f9ec52898fee81.png)

Have you considered using Android Studio directly and just using Processing as a library?

I will not be trying this anytime soon but have used Android Studio in the past with Processing libraries just as I have used other IDEs with the Processing library.

_Any response from an AI such as ChatGPT needs to be scrutinized._

`:)`

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [February 13, 2026, 5:07pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/3 "2026-02-13T17:07:13Z")

</div>

> [@aiapps](#):
>
> I understand the Android mode isn’t compatible with Java 17

Is there any documentation for this assumption? I’ve been unable to find this documented anywhere. Which jdk are you using on which operating system? Would it be possible to post test android code which fails because of this?

For whatever it’s worth here is the jdk that my macos system is using (it’s well past 17):

```processing
% java --version
openjdk 24.0.1 2025-04-15
OpenJDK Runtime Environment Zulu24.30+13-CA (build 24.0.1+9)
OpenJDK 64-Bit Server VM Zulu24.30+13-CA (build 24.0.1+9, mixed mode, sharing)

```

The jdk that Android mode is using is another issue and currently I don’t know how to find that out. According to one of your previous posts you are using Windows 7; is that still true?

---

<div class="post-metadata">

**Author:** ![aiapps](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/aiapps/32/21731_2.png) [@aiapps](https://discourse.processing.org/u/aiapps)\
**Post date:** [February 13, 2026, 5:09pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/4 "2026-02-13T17:09:38Z")

</div>

Code containing Java 17 features does not compile in Android Mode.

I’ll send you examples a little later if you need them.I’ll send you some examples a little later if you need them, but overall it’s not hard to check.

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [February 13, 2026, 5:11pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/5 "2026-02-13T17:11:57Z")

</div>

> [@aiapps](#):
>
> it’s not hard to check.

Could you come up with a simple demonstration of this that fails on your system; I’d like to try running it here.

---

<div class="post-metadata">

**Author:** ![aiapps](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/aiapps/32/21731_2.png) [@aiapps](https://discourse.processing.org/u/aiapps)\
**Post date:** [February 13, 2026, 7:07pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/6 "2026-02-13T19:07:43Z")

</div>

Try using record classes, for example it doesn’t work with them

---

<div class="post-metadata">

**Author:** ![aiapps](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/aiapps/32/21731_2.png) [@aiapps](https://discourse.processing.org/u/aiapps)\
**Post date:** [February 13, 2026, 7:08pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/7 "2026-02-13T19:08:17Z")

</div>

Try using record classes, for example it doesn’t work with them

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [February 13, 2026, 7:14pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/8 "2026-02-13T19:14:49Z")

</div>

Hello @aiapps,

If you post an MCVE I will try it.

Reference:

_[Guidelines—Asking Questions](https://discourse.processing.org/t/guidelines-asking-questions/2147/1)_

> [@Guidelines—Asking Questions](https://discourse.processing.org/t/guidelines-asking-questions/2147/1):
>
> Note that if you post extra code, you might be asked to narrow your problem down to a [Minimum, Complete, Verifiable Example](https://stackoverflow.com/help/mcve).

Have fun!

`:)`

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [February 13, 2026, 8:32pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/9 "2026-02-13T20:32:39Z")

</div>

Java mode doesn’t recognize the keyword ‘record‘ on my system, so I doubt that Android mode would recognize it either. I’m fairly certain that the Processing IDE uses Java 17 so not sure why it doesn’t work in Java mode.

```processing
record Rectangle(double length, double width) { }

```

Error message:

`The class “record” does not exist`

---

<div class="post-metadata">

**Author:** ![aiapps](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/aiapps/32/21731_2.png) [@aiapps](https://discourse.processing.org/u/aiapps)\
**Post date:** [February 13, 2026, 9:02pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/10 "2026-02-13T21:02:51Z")

</div>

Yes i still using Windows 7

---

<div class="post-metadata">

**Author:** ![aiapps](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/aiapps/32/21731_2.png) [@aiapps](https://discourse.processing.org/u/aiapps)\
**Post date:** [February 13, 2026, 9:11pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/11 "2026-02-13T21:11:20Z")

</div>

To at least somehow reduce the circle of guesses, I can say that the code compiled for version 17 works if it is in the form of a library.

But even in this case, it doesn’t work in Android mode, only in Java mode.

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [February 13, 2026, 9:21pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/12 "2026-02-13T21:21:39Z")

</div>

> [@aiapps](#):
>
> I can say that the code compiled for version 17 works if it is in the form of a library.

You have written a library? You may need to go to the github repository and post your question there for more direct help: [https://github.com/processing/processing-android](https://github.com/processing/processing-android)

You could post your findings and question under the ‘issues‘ tab.

---

<div class="post-metadata">

**Author:** ![aiapps](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/aiapps/32/21731_2.png) [@aiapps](https://discourse.processing.org/u/aiapps)\
**Post date:** [February 13, 2026, 10:05pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/13 "2026-02-13T22:05:49Z")

</div>

In any case, thank you all for your answers and suggestions, I hope a solution can be found to this issue.

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [February 13, 2026, 10:09pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/14 "2026-02-13T22:09:43Z")

</div>

> [@aiapps](#):
>
> To at least somehow reduce the circle of guesses, I can say that the code compiled for version 17 works if it is in the form of a library.

If you compile for Java 16+ that will work.

Processing 4.5.2  
Windows 10  
Java mode

This is directly from the source for Java mode and may offer an explanation:

> <https://github.com/processing/processing4/blob/main/java/src/processing/mode/java/Compiler.java#L67>

`record` requires Java 16+

`:)`

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [February 13, 2026, 10:11pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/15 "2026-02-13T22:11:43Z")

</div>

It appears that ‘_record_‘ is not baked into either Java mode or Android mode and probably should be. It looks simpler to use than the standard ‘class’ syntax. Thanks for making us aware of it and keep pursuing it. The runtime can be changed by user input.

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [February 13, 2026, 10:40pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/16 "2026-02-13T22:40:52Z")

</div>

Hello @aiapps,

Processing Android mode:

> <https://github.com/processing/processing-android/blob/main/build.gradle#L46>

This shows the complexity of getting some things to work:

> **[Records in Android Studio Flamingo](https://android-developers.googleblog.com/2023/06/records-in-android-studio-flamingo.html)**
>
> Here's a codelab on how to declare a record in Android Studio Flamingo.

The article is from 28 June 2023.

I see you have submitted an issue! 👍

Have fun!

`:)`

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [February 14, 2026, 3:05pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/17 "2026-02-14T15:05:02Z")

</div>

Hello @aiapps ,

Take a look at this:

> <https://github.com/processing/processing-android/issues/767>
>
> Right now the entire build system is stuck at Gradle 7.2 and Android 33 because …anything higher would require moving to Gradle 8. which is not backwards-compatible.
> 
> The official upgrade docs may be useful: https://docs.gradle.org/current/userguide/upgrading\_version\_7.html

> [@glv](#):
>
> This shows the complexity of getting some things to work

`:)`

---

<div class="post-metadata">

**Author:** ![aiapps](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/aiapps/32/21731_2.png) [@aiapps](https://discourse.processing.org/u/aiapps)\
**Post date:** [February 14, 2026, 11:40pm UTC](https://discourse.processing.org/t/can-i-run-android-mode-with-java-17-features/47869/18 "2026-02-14T23:40:20Z")

</div>

As far as I understand, the Android mode only works with java 1.7, since lambda expressions are also not supported
