Java on Jetson Nano

I was testing this morning with some example sketches and the “performance examples” are not running due to a “fatal error” detected by the Java Runtime Environment. (“Failed to write core dump. Core dumps have been disabled”)

It’s something curious that the error only appears in those sketches that has P2D or P3D in size!!! In other words, those sketches that utilize OpenGL and not the default renderer (this ones can be runned).
I have tested OpenGL with glmark2 in my system and it works perfectly. In fact, it shows a great score in glmark2 test and animations are running so smothly!
What can be the reason of that?

This is what Processing texts:
[i]A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x0000007f94fcb670, pid=7155, tid=0x0000007fad4091f0*
JRE version: OpenJDK Runtime Environment (8.0_212-b162) (build 1.8.0_212-b162)
Java VM: OpenJDK 64-Bit Server VM (25.212-b162 mixed mode, Evaluation linux-aarch64 compressed oops)

Problematic frame:*
C [libGLX.so.0+0xd670]*
Failed to write core dump. Core dumps have been disabled. To enable core dumping, try “ulimit -c unlimited” before starting Java again

An error report file with more information is saved as:
tmp/hs_err_pid7155.log

If you would like to submit a bug report, please visit:

Customer Support for Platform Core & Platform Prime | Azul*
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.
Could not run the sketch (Target VM failed to initialize).
For more information, read revisions.txt and Help → Troubleshooting.[/i]

It seems that the “experimental FX2D renderer is not supported on ARM, because Oracle dropped support for JavaFX on ARM devices with Java 8u33. We might want to try using OpenJFX project in the future, but as of now this is unsupported.”, as seen in Supported Platforms · processing/processing Wiki · GitHub
GAME OVER
:(
But if I run it on Raspberry Pi 3 B+(an ARM SBC), it doesn’t crash although it goes really slow! This is crazy

Incredible, I have Processing sketches running with OpenGL renderers. Although when I close them you can see some errors in the console, the sketch runs now.
I have read the post of Diablo in [url]https://devtalk.nvidia.com/default/topic/1051204/jetson-nano/how-detected-tegra-gl-core-correctly-in-cmake-/post/5335756/?offset=5#5347306[/url] and he gave me an idea. I changed the /usr/lib/aarch64-linux-gnu/libGLX.so.0 problematic file for the /usr/lib/aarch64-linux-gnu/tegra/libGLX_nvidia.so.0 file. Then I rename this file to libGLX.so.0 and Processing now can run OpenGL rendered sketches.
[url]https://drive.google.com/open?id=1h8bDiVyrTlOazdEIJeJS4GI5lvw9Teew[/url]
The problem seems to be that Processing when uses OpenGL doesn’t link to tegra lib and it goes to libGLX.so.0 I’m not a computer technician, I can be wrong but it works.
:D

These are the final errors that appear when I close the sketch:
[url]https://drive.google.com/open?id=1CnzQ0eBjvmjBqiRu8IZXd4A8Zcq9S1-A[/url]

I can’t get Eclipse to start on the Jetson Nano. I get the following log. Any ideas what’ wrong? Has anyone else got Eclipse working on the Jetson Nano?

!SESSION Sat Jun 15 11:13:15 EDT 2019 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2019-06-15 11:13:15.645
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:626)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

No idea.
My Jetson Nano has even stop playing OpenGL Processing sketches with the trick that I described in this forum. The background is now black and the menu that you could see in the upper border of the screen and the other one with logos that you could see at the left border are missing. So, the minimize and close icons that every window has in the upper side.

So, now my Jetson Nano is inside its beautiful carboard box.

Yes. Here is how to install and run Eclipse on Jetson Nano and other AArch64 boards with Ubuntu/Debian:

  1. Install Eclipse package (3.8.1 on 18.04)
    sudo apt-get install eclipse

  2. Fix Equinox
    (see Bug #1754886 “Eclipse fails to start (java.lang.ClassNotFoundExc...” : Bugs : eclipse package : Ubuntu)
    wget http://archive.ubuntu.com/ubuntu/pool/universe/e/eclipse/libequinox-osgi-java_3.8.1-8_all.deb
    sudo dpkg -x libequinox-osgi-java_3.8.1-8_all.deb libequinox-osgi-java_3.8.1-8_all
    sudo cp libequinox-osgi-java_3.8.1-8_all/usr/lib/eclipse/plugins/* /usr/lib/eclipse/plugins

  3. Install Liberica JDK 8
    (based on https://apt.bell-sw.com/)
    wget -q -O - https://download.bell-sw.com/pki/GPG-KEY-bellsoft | sudo apt-key add -
    echo “deb [arch=arm64] https://apt.bell-sw.com/ stable main” | sudo tee /etc/apt/sources.list.d/bellsoft.list
    sudo apt-get update
    sudo apt-get install bellsoft-java8

  4. Launch Eclipse
    eclipse

1 Like

I just installed maven (which installs openjdk 11) and it works well except the JavaDoc compiler.
And If you want the offical Oracle version, you can download the last release for ARM64 (8u221) and install it. It works for me.
To install it do this:
sudo update-alternatives --install /usr/bin/java java /home/dev/jdk1.8.0_221/bin/java 3000

Thank you for the fix! It works. Unfortunately 3.8 is very old and outdated Eclipse. Sure it is still good enough, but I wonder why it is so old? Do someone have an idea how to install modern Eclipse for arm-64 on NX or Nano?

The latest Eclipse IDE is working on Jetson Nano with default-jdk: Eclipse on Nvidia Jetson Nano - #9 by bobfu.