I am trying to run Oracle SQL Developer 22.2.1 under Manjaro 22.0.1 using openjdk version "17.0.6" 2023-01-17. For debugging purposes, I have experimented with and yielded the same results using openjdk version "11.0.18" 2023-01-17. Both have been installed using pacmanfrom the official arch repositories (jre17-openjdk and jre11-openjdk respectively).
This resulted in the following error:
> oracle-sqldeveloper
Error occurred during initialization of boot layer
java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-17-openjdk/lib/libnio.so: /usr/lib/jvm/java-17-openjdk/lib/libnio.so: undefined symbol: reuseport_available
Inspecting libnio.so more closely, the culprit seems to actually be libjvm.so:
> ldd /usr/lib/jvm/java-17-openjdk/lib/libnio.so
linux-vdso.so.1 (0x00007ffe0f1d7000)
libjava.so => /usr/lib/jvm/java-17-openjdk/lib/libjava.so (0x00007f7354ce7000)
libnet.so => /usr/lib/jvm/java-17-openjdk/lib/libnet.so (0x00007f7354ccf000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f7354abb000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f7354d23000)
libjvm.so => not found
libjvm.so => not found
This is in turn located under /usr/lib/jvm/java-17-openjdk/lib/server/libjvm.so. A bit of research here and there yields setting the LD_LIBRARY_PATH as a potential solution. And indeed, by doing so, the application starts just fine!
Now finally on to my actual questions:
LD_LIBRARY_PATH for those different versions that each have their own lib directories?Currently, I am only facing the problems with SQL Developer. I have already explicitly set the Java version to use in ~/.sqldeveloper/22.2.1/product.conf. Maybe there would also be a possibility to supply the library path in there? Using -Djava.library.path did not work so far.
On my Manjaro installation, i've set the environment variables:
export JAVA_HOME=/usr/lib/jvm/default
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jvm/default/lib/server
I set the variables appointing to the default symlink, to appoint to default JVM set from the archlinux-java program. Before set this variables, the Oracle SQL Developer has opened normally.
From the .desktop file, other change is necessary. To do this, you can use the menulibre to edit the Oracle SQL Developer SQL Entry. In the command field (equivalent to the line which starts from Exec= text), change to the below line:
env LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jvm/default/lib/server /usr/bin/oracle-sqldeveloper
My solution is derived from the 'drslmr' solution to fix the Eclipse installation: https://aur.archlinux.org/packages/eclipse-java#news
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With