3

I have installed Arduino. When I run it from terminal it gives me the following messages:

A fatal error has been detected by the Java Runtime Environment:
#  SIGSEGV (0xb) at pc=0x00007f02d79d9009, pid=28430, tid=28458

# JRE version: OpenJDK Runtime Environment (9.0) (build 9-internal+0-2016-04-14-195246.buildd.src)
# Java VM: OpenJDK 64-Bit Server VM (9-internal+0-2016-04-14-195246.buildd.src, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libjava.so+0x1d009]  JNU_GetEnv+0x19
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %P" (or dumping to /home/shauqi/core.28430)
#
# An error report file with more information is saved as:
# /home/shauqi/hs_err_pid28430.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
/usr/bin/arduino: line 14: 28430 Aborted                 (core dumped) java -jar /usr/share/arduino/arduinopc.jar
No required groups are missing for this user.
Exception in thread "main" java.lang.ExceptionInInitializerError
at processing.app.Preferences.save(Preferences.java:735)
at processing.app.Preferences.init(Preferences.java:249)
at processing.app.Base.main(Base.java:117)
Caused by: java.lang.NumberFormatException: For input string: "9-i"
at jdk.internal.math.FloatingDecimal.readJavaFormatString(java.base@9-internal/FloatingDecimal.java:2054)
at jdk.internal.math.FloatingDecimal.parseFloat(java.base@9-internal/FloatingDecimal.java:122)
at java.lang.Float.parseFloat(java.base@9-internal/Float.java:451)
at java.lang.Float.<init>(java.base@9-internal/Float.java:532)
at processing.core.PApplet.<clinit>(Unknown Source)
... 3 more

I am running ubuntu 16.04.1.

My java info:

openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
Zanna
  • 70,465
Shauqi
  • 33

1 Answers1

2

Same problem listed on bugs but no useable solution and it has a "fix released".

Arduino is expecting a number "9" and not "9-internal". I would suggest using another JDK that uses a digit for numbering. The problem is within Arduino's version number check for JDK though.

Rinzwind
  • 299,756
  • Which version of JDK should i use? Should i downgrade my present version? – Shauqi Oct 03 '16 at 09:18
  • How is anyone but you going to be able to answer that? The version you want is the one that lets you use all the software that requires JDK. I would assume 8? Why would you even consider running an "internal" (that is a beta from the looks of it? ) version of JDK on Ubuntu? – Rinzwind Oct 03 '16 at 09:28
  • 1
    It works OK with OpenJDK 8. I opened up /usr/bin/arduino and then replaced every instance of java with /usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/bin/java to force arduino to run under JRE 8 without changing my default JRE. Obviously that depends upon you having openjdk-8-jre installed. – Ian Gibbs Oct 27 '17 at 14:33
  • The command sudo update-alternatives --config java helps you to choice the version of the java environement. – dubis Jan 24 '18 at 13:31