and try.
nvidia@tegra-ubuntu:~$ arduino
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.awt.HeadlessException
at sun.awt.HeadlessToolkit.getMenuShortcutKeyMask(HeadlessToolkit.java:236)
at processing.core.PApplet.(Unknown Source)
… 3 more
and reinstall java8 still error.
Please advise me.
Apichat
I have no knowledge of arduino. It does seem though from “HeadlessException” that you are accessing the Jetson remotely. Are you using ssh? If so, did you ssh in with “-Y” or set up some sort of configuration for where to display or what display to associate with?
This works for me.
Note: If it doesn’t start, and gives some error messages, it may be that you’re missing some system libraries that are needed (GTK related, for example.)
Those can be installed using sudo apt install.
I am guessing JAVA_HOME (or something similar) needs to name the path to the java app. I do not know what that requirement is for your software, but typically it goes something like this:
./arduino: line 35: /opt/arduino-1.8.5/java/bin/java: No such file or directory
Does the file actually exist? That should have been the first thing you checked and told us about.
Use the “file” command to figure out whether the problem is that the file doesn’t exist, that it has the wrong format, or that it fails to start because of some missing dependency:
This means that the “file” that’s not found is some kind of dependency.
You need to make sure that the 32-bit userspace is enabled and installed on the Jetson.
If that’s already done, then you need to also figure out which shared library is missing, and which package provides that shared library, and install it.
How to do that is covered in a number of tutorials on the web, and is not Jetson specific at all – it’s all general Linux system administration stuff.
Hopefully you should have enough key words to Google for now to get it going. Once it does work, please come back and post what you did to make it work, so that others who find this thread can learn, too!
Since that java executable is for ARMv7 (armhf, 32-bit), not ARMv8-a (aarch64/arm64, 64-bit), you’d have to install a 32-bit linker (a “foreign architecture”…native is arm64) and every single library it wants…and every library every library wants…recursively. Maybe 32-bit is a requirement of the software you are trying to run (I’ve never touched arduino), but I’d have to wonder if there is a native 64-bit version. Where did you get “/opt/arduino-1.8.5/java/bin/java”? Was this part of the arduino?
I’m just thinking that if a native java is available it might be simpler than putting in a 32-bit java. It’s quite likely that if parts of the system are looking for 64-bit it won’t see anything which is 32-bit. I’m curious as to what the requirements are.
The ARM version of the Arduino IDE is only available for ARM7 (32-bit)
Thus, you have to install the 32-bit user-space support, and each of the 32-bit libraries it needs.
I’ve done it, it works, I run Arduino (with the Teensyduino addition, even) on my Jetson TX2.
OK OK OK
It works, without any recovery, purged java and openjdk, restarting from SYNAPTIC and choosing openjdk8
Now I’m in the IDE, in trouble with the communication: “programmer is not responding”
dev/ttyS0
is the only port in the SERIAL PORT menu
with lsusb I get
nvidia@tegra-ubuntu:~$ lsusb
Bus 002 Device 002: ID 05e3:0616 Genesys Logic, Inc. hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)
Bus 001 Device 004: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 003: ID 045e:0750 Microsoft Corp. Wired Keyboard 600
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub