0

I'm trying to add open socket capabilities to a java application, I added these line to my startup script

 MY_JAVA_PATH=/home/dds/jdk-11.0.18+10
 echo "Using java [${MY_JAVA_PATH}]"
 JAVA=${MY_JAVA_PATH}/bin/java
 echo "allowing ${JAVA} java to open sockets"
 # allow JAVA to open UDP sockets so I can use isReachable() with ICMP ping
 sudo setcap cap_net_raw=+ep ${JAVA}
 ${JAVA} --module-path=javafx17-sdk/lib --add-modules=javafx.base,javafx.controls -jar myprogram.jar

After I run it as
$ ./start.sh
I recive this error:

/home/dds/jdk-11.0.18+10/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

Noting that /home/dds/jdk-11.0.18+10/lib/jli/libjli.so exists and is in its default (executable relative) place

What am I missing?

DDS
  • 2,340
  • 16
  • 34
  • Does this answer your question? [Linux error while loading shared libraries: cannot open shared object file: No such file or directory](https://stackoverflow.com/questions/480764/linux-error-while-loading-shared-libraries-cannot-open-shared-object-file-no-s) – rghome Feb 07 '23 at 14:13
  • @rghome No, it does not fix: LD_LIBRARY_PATH is empty both after and before the call (also the lib is in its default place) – DDS Feb 07 '23 at 16:56

0 Answers0