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?

3
  • How did you installed Arduino IDE? Which version do you have installed?
    – N0rbert
    Oct 21, 2018 at 16:21
  • I can confirm your issue with arduino from the repository. But version from umake works as expected.
    – N0rbert
    Oct 21, 2018 at 16:31
  • 3
    Possible duplicate of How to install latest Arduino IDE?
    – N0rbert
    Oct 21, 2018 at 16:32

1 Answer 1

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).

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .