1

On freshly installed Ubuntu 18.10 Arduino installed from official repositories can't start with error

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.StringIndexOutOfBoundsException: begin 0, end 3, length 2
    at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
    at java.base/java.lang.String.substring(String.java:1874)
    at processing.core.PApplet.<clinit>(Unknown Source)
    ... 3 more

How can I debug this issue?

1 Answers1

1

If you really want to get old Arduino 1.0.5 working - then you should install previous version of OpenJDK - 8 and set it as default:

sudo apt-get install openjdk-8-jre openjdk-8-jre-headless

sudo update-java-alternatives --set \
java-1.8.0-openjdk-$(dpkg --print-architecture)

Do not forget to add your user to dialout group with sudo usermod -a -G dialout $USER.

But I can recommend to get modern 1.8.7 with help of Ubuntu Make (see this Q&A for details).

N0rbert
  • 99,918