# Serial Routine Crashing with Latest Java jre-8u261

**URL:** <https://discourse.processing.org/t/serial-routine-crashing-with-latest-java-jre-8u261/22798>\
**Category:** Processing\
**Created:** [July 23, 2020, 2:13pm UTC](https://discourse.processing.org/t/serial-routine-crashing-with-latest-java-jre-8u261/22798 "2020-07-23T14:13:24Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![PhilHaw](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/philhaw/32/8221_2.png) [@PhilHaw](https://discourse.processing.org/u/PhilHaw)\
**Post date:** [July 23, 2020, 2:13pm UTC](https://discourse.processing.org/t/serial-routine-crashing-with-latest-java-jre-8u261/22798/1 "2020-07-23T14:13:24Z")

</div>

After updating Java to the latest version jre8u261 a couple of my Processing apps now crash when I try to open a Serial (COM) port. They worked fine with jre8u251 that I had installed.

The apps run ok in the Processing IDE but the exported versions crash. I did find that if I export with the ‘Embed Java for Windows (64-bit)’ option checked then they do work.

I will try to upload a simple sketch to illustrate this but has anyone else seen this or a similar issue? I am using the G4P library and the crash occurs when I select the required COM port from a G4P droplist.

I can post the Java error log file if that would help?

Thanks, Phil.

---

<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:** [July 23, 2020, 2:23pm UTC](https://discourse.processing.org/t/serial-routine-crashing-with-latest-java-jre-8u261/22798/2 "2020-07-23T14:23:37Z")

</div>

Hello,

It is my experience that Java updates can “break” things and not just in Processing.

“Embedding Java… will be far more likely to work”:  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/d/dc996080537d26eccf00088fd37857fd40644680.png)

It embeds the same version that the Processing IDE uses.

`:)`

---

<div class="post-metadata">

**Author:** ![PhilHaw](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/philhaw/32/8221_2.png) [@PhilHaw](https://discourse.processing.org/u/PhilHaw)\
**Post date:** [July 23, 2020, 2:29pm UTC](https://discourse.processing.org/t/serial-routine-crashing-with-latest-java-jre-8u261/22798/3 "2020-07-23T14:29:34Z")

</div>

Thanks for the info glv - I wasn’t sure which Java Processing was embedding but testing it showed it works! Do the apps exported with the Java embedded also work on Windows 32-bit OS?

Phil.

---

<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:** [July 23, 2020, 2:45pm UTC](https://discourse.processing.org/t/serial-routine-crashing-with-latest-java-jre-8u261/22798/4 "2020-07-23T14:45:51Z")

</div>

> [@PhilHaw](#):
>
> Do the apps exported with the Java embedded also work on Windows 32-bit OS?

I have the 32 and 64 bit versions of Processing installed and export from these to have both versions.

_It does clearly state what target platform you are exporting to in the window_.

I have not done this in a while but did come across this issue at one time.

I did find this:

> **[Exporting Applications](https://happycoding.io/tutorials/processing/exporting-applications)**
>
> Share your programs with other people.

[https://processing.org/reference/environment/#Export](https://processing.org/reference/environment/#Export)

Following the links it states:

> **We strongly recommended that you embed Java with your application.** Not including it opens a pandora’s box of problems that can happen when people try to run your project.

`:)`

---

<div class="post-metadata">

**Author:** ![PhilHaw](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/philhaw/32/8221_2.png) [@PhilHaw](https://discourse.processing.org/u/PhilHaw)\
**Post date:** [July 23, 2020, 2:50pm UTC](https://discourse.processing.org/t/serial-routine-crashing-with-latest-java-jre-8u261/22798/5 "2020-07-23T14:50:25Z")

</div>

I never thought of having both version of Processing installed - that could be the problem solved!

Thanks again.

---

<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:** [July 23, 2020, 3:01pm UTC](https://discourse.processing.org/t/serial-routine-crashing-with-latest-java-jre-8u261/22798/6 "2020-07-23T15:01:18Z")

</div>

Hello,

Additional information below if you want to venture down the rabbit hole… I will be generating some builds in the future and a good reference.

I have not “built” Processing from source for a while…

There is a reference to what it is using:

> <https://github.com/processing/processing/blob/master/build/build.xml#L73>

And older versions of Java here:  
[https://www.java.com/en/download/faq/other\_jreversions.xml](https://www.java.com/en/download/faq/other_jreversions.xml)

Note:  
I needed these when using Processing in Eclipse; I had to add the java components from Processing and the JDK.

Another reference:

> [@Which JDK Version to build libraries with Eclipse](https://discourse.processing.org/t/which-jdk-version-to-build-libraries-with-eclipse/8193):
>
> Hi, which JDK version do I need to build my own libs using Eclipse on Windows 10. Thanks f41ardu

`:)`

---

<div class="post-metadata">

**Author:** ![PhilHaw](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/philhaw/32/8221_2.png) [@PhilHaw](https://discourse.processing.org/u/PhilHaw)\
**Post date:** [July 23, 2020, 3:09pm UTC](https://discourse.processing.org/t/serial-routine-crashing-with-latest-java-jre-8u261/22798/7 "2020-07-23T15:09:25Z")

</div>

Wow! Big rabbit hole 🤪

I like the comment about Oracle in line 80 😂

Phil.

---

<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:** [July 23, 2020, 3:13pm UTC](https://discourse.processing.org/t/serial-routine-crashing-with-latest-java-jre-8u261/22798/8 "2020-07-23T15:13:55Z")

</div>

I also use Processing 4:

> **[Download Processing](https://processing.org/download/)**
>
> Processing is open source and is available for macOS, Windows, and Linux. Projects created with Processing are also cross-platform, and can be used on macOS, Windows, Android, Raspberry Pi, and many o…

_Processing 4 is Pre-Release and not a Stable Release._

And latest builds:

> [@Processing in style with Java 11](https://discourse.processing.org/t/processing-in-style-with-java-11/13776/42):
>
> I set up my RPi 4 with a 64-bit kernel and an SSD root drive thanks to these instructions: [https://www.jeffgeerling.com/blog/2020/im-booting-my-raspberry-pi-4-usb-ssd](https://www.jeffgeerling.com/blog/2020/im-booting-my-raspberry-pi-4-usb-ssd) After installing OpenJDK 11, and replacing the included x86-64 JDK with the arm64 version, as mentioned in previous posts, I was able to use the Processing4 build (2020-04-26\_22-59-00\_linux\_aarch64.zip) successfully partying_face Tried out some simple sketches of mine and they ran perfectly. Awesome work!

`:)`

---

<div class="post-metadata">

**Author:** ![PhilHaw](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/philhaw/32/8221_2.png) [@PhilHaw](https://discourse.processing.org/u/PhilHaw)\
**Post date:** [July 23, 2020, 10:47pm UTC](https://discourse.processing.org/t/serial-routine-crashing-with-latest-java-jre-8u261/22798/9 "2020-07-23T22:47:25Z")

</div>

Many thanks again glv. I now have both 32-bit and 64-bit versions of Processing installed and can export my apps with either, one embeds a 32-bit Java and the other a 64-bit Java.

It’s worth the extra download size of embedding the Java to make sure all my users can get the apps to work on their systems.

Phil

---

<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:** [July 29, 2020, 3:01pm UTC](https://discourse.processing.org/t/serial-routine-crashing-with-latest-java-jre-8u261/22798/10 "2020-07-29T15:01:43Z")

</div>

Here is the link to building Processing:

> **[Build Instructions](https://github.com/processing/processing/wiki/Build-Instructions)**
>
> Source code for the Processing Core and Development Environment (PDE) - processing/processing

It also states:

> Other versions of Java are [not supported](https://github.com/processing/processing/wiki/Supported-Platforms#java-versions). It must be 8u202. Later versions of Java (9, 10, 13, whatever) [don’t work either](https://github.com/processing/processing/wiki/Supported-Platforms#java-9-10-and-11).

`:)`

---

<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 6, 2022, 1:39pm UTC](https://discourse.processing.org/t/serial-routine-crashing-with-latest-java-jre-8u261/22798/11 "2022-02-06T13:39:14Z")

</div>

Update…

One of the links in this topic no longer works:

> [@Serial Routine Crashing with Latest Java jre-8u261](https://discourse.processing.org/t/serial-routine-crashing-with-latest-java-jre-8u261/22798/4):
>
> I have the 32 and 64 bit versions of Processing installed and export from these to have both versions. It does clearly state what target platform you are exporting to in the window. I have not done this in a while but did come across this issue at one time. I did find this: [https://processing.org/reference/environment/#Export](https://processing.org/reference/environment/#Export) Following the links it states: We strongly recommended that you embed Java with your application. Not including it opens a pandora’s box of problems that can ha…

An updated link:  
[Environment / Processing.org](https://processing.org/environment/#export)_Export_ is in the table of contents!

Which will direct you to the Wiki:

> **[Export Info and Tips](https://github.com/processing/processing/wiki/Export-Info-and-Tips)**
>
> Source code for the Processing Core and Development Environment (PDE) - processing/processing

`:)`
