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 pacman
from 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:
- Is this some problem with my JDK installation and those links are supposed to work out-of-the-box?
- I am regularly working with 2-3 different JDK installations (openjdk and GraalVM 8, 11 and 17). How would I best set the
LD_LIBRARY_PATH
for those different versions that each have their ownlib
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.