FS#64081 - [arduino] The IDE doesn't start with jre-openjdk 13

Attached to Project: Community Packages
Opened by Juan Francisco Cantero Hurtado (juanfra) - Wednesday, 09 October 2019, 21:29 GMT
Last edited by NicoHood (NicoHood) - Thursday, 13 May 2021, 09:16 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To NicoHood (NicoHood)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

Yesterday jre-openjdk was updated to the version 13 and now the arduino IDE doesn't start. This is the error:

Picked up JAVA_TOOL_OPTIONS:
java.lang.ExceptionInInitializerError
at processing.app.helpers.PreferencesMap.load(PreferencesMap.java:100)
at processing.app.helpers.PreferencesMap.load(PreferencesMap.java:74)
at processing.app.PreferencesData.init(PreferencesData.java:56)
at processing.app.BaseNoGui.initParameters(BaseNoGui.java:835)
at processing.app.Base.<init>(Base.java:213)
at processing.app.Base.main(Base.java:151)
Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 2
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3720)
at java.base/java.lang.String.substring(String.java:1909)
at processing.app.legacy.PApplet.<clinit>(PApplet.java:38)
... 6 more

I also tried removing the config dir of arduino, but it still crashes.

Additional info:
* jre-openjdk 13.u33-1 arduino 1:1.8.9-3


This task depends upon

Closed by  NicoHood (NicoHood)
Thursday, 13 May 2021, 09:16 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with 1.8.14-1 by using java8
Comment by Maurizio Morgante (maurizio) - Sunday, 13 October 2019, 16:55 GMT
I've the same problem
Comment by Lukas Müller (vanc) - Monday, 14 October 2019, 13:18 GMT
Same for me.
Comment by Lukas Müller (vanc) - Monday, 14 October 2019, 13:50 GMT
So the error comes from line 38 https://github.com/arduino/Arduino/blob/master/arduino-core/src/processing/app/legacy/PApplet.java
The version string returned is of length 2, not as expected 3.

I switched to openjdk-8 using archlinux-java as stated in "Switching between JVM" on the following site: https://wiki.archlinux.org/index.php/Java

Hope it helps.
Comment by Maurizio Morgante (maurizio) - Monday, 14 October 2019, 18:12 GMT
This is my (temporary) solution:

$ sudo pacman -S jre11-openjdk

$ archlinux-java status
Available Java environments:
java-11-openjdk
java-13-openjdk (default

$ sudo archlinux-java set java-11-openjdk

Solved :-)
Comment by Shin lorddeus (lorddeus) - Tuesday, 15 October 2019, 10:15 GMT
It works perfectly this temporary solution.
Thank you Maurizio!
Comment by jano (jancici) - Thursday, 17 October 2019, 09:56 GMT
yes, that workardound works but you changed default JAVA for all apps

create this script in your hone
=====================================
#!/bin/sh
export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH
exec /usr/share/arduino/arduino "$@"
=====================================

replace that java-8-openjdk with 11 if you that one

and you can used that script to start arduino ide
Comment by adam spontarelli (smed) - Tuesday, 12 May 2020, 16:30 GMT
This appears to be fixed upstream as of yesterday. https://github.com/arduino/Arduino/issues/10187
Comment by mirh (mirh) - Friday, 11 September 2020, 19:24 GMT
This can be closed then.
Comment by NicoHood (NicoHood) - Thursday, 13 May 2021, 09:16 GMT
I have reverted back to java8, since everything else just caused problems.

Loading...