Udocker run java got "Could not find Java SE Runtime Environment" Error.
Commands i ran:
udocker create --name=java openjdk:8-jdk-alpine
udocker setup --execmode=F1 java
udocker run java javac -version
Output
executing: javac Error: could not find libjava.so Error: Could not find Java SE Runtime Environment.
Any fixes for this ??
please use either F3 ou F4 execmodes
udocker create --name=java openjdk:8-jdk-alpine
udocker setup --execmode=F3 java
udocker run java javac -version
##############################################################################
# #
# STARTING 44063a31-43c4-3d51-9cc3-4a219c19c7ad #
# #
##############################################################################
executing: javac
javac 1.8.0_212
F1 and F2 modes are sometimes tricky with full lib pathnames
solved in 1.3.5 tested with py2.7, py3.6-py3.10 tested in ubuntu 18.04, 22.04, centos7 rocky8
@mariojmdavid issue still exists, I tried it out in Ubuntu 18.04.
udocker create --name=java openjdk:8-jdk-alpine
- Mode: F1
udocker setup --execmode=F1 java
udocker run java javac -version
##############################################################################
# #
# STARTING 3ffeec4f-87bd-37a6-9ccd-860ec04b5b93 #
# #
##############################################################################
executing: javac
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.
- Mode: F2
udocker setup --execmode=F2 java
udocker run java javac -version
##############################################################################
# #
# STARTING 3ffeec4f-87bd-37a6-9ccd-860ec04b5b93 #
# #
##############################################################################
executing: javac
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.
- Mode: F3
udocker setup --execmode=F3 java
udocker run java javac -version
##############################################################################
# #
# STARTING 3ffeec4f-87bd-37a6-9ccd-860ec04b5b93 #
# #
##############################################################################
executing: javac
javac 1.8.0_212
as you said in the above replies, with F3 we're getting the expected response in previous versions as well.
This is a by design limitation of running with F1 and F2 not an issue. Modes F1 and F2 are meant to be fast to setup requiring very few changes to the container content at the expense of potential library loading related problems. On the other hand with mode F3 these application errors are much less likely to happen but at the expense of potentially painfully slow setup times especially when the container files are in distributed/remote file systems as mode F3 needs to make changes to the ELF headers of all executables and shared libraries precisely to avoid the problems that may arise with F1 and F2.
Bottom line depending on the application the modes F1 or F2 may work just fine, if they don't please use F3.
@jorge-lip @mariojmdavid issue was resolved with mode F3.