Error with linux-oracle-jdk18

Dear ALL:
I install linux-c7 with pkg, and linux-oracle-jdk18 with ports, all all seems all right when installing. but when I type the command /usr/local/linux-oracle-jdk/bin/java -version has no response and no error messages.
anyone can help me with this error?
---------------------------------
2017-08-03 update:
I have solved this problem, just simply cp the libjli.so(in $ORACLE_JDK_DIR/lib/i386/jli) to /lib, and copy to /compat/linux/lib/ also works
but i find another problem, linux-oracle-jdk works alright by root user, but does not work with others(wheel group).
 
Last edited:
Doesn't simply java -version work? If I recall correctly it uses a wrapper to automatically select the correct Java environment (you can install different JDKs next to each other on FreeBSD).
 
Doesn't simply java -version work? If I recall correctly it uses a wrapper to automatically select the correct Java environment (you can install different JDKs next to each other on FreeBSD).
I install openjdk8 as well, and both "java -version" and "/usr/local/openjdk/bin/java -version" works well.
but before install openjdk(only install linux-oracle-jdk18), "java -version" doesn't work as well.
 
Because the linux-oracle-jdk18 depends on the Linux emulation did you enable that correctly?
 
Because the linux-oracle-jdk18 depends on the Linux emulation did you enable that correctly?
Yes, I install linux-c7 meta package with pkg install linux-c7, and do all the configurations on the FreeBSD handbook:
1、load the linux64 model, and add "linux_enable=yes" in rc.conf
Code:
$ kldstat
Id Refs Address            Size     Name
 1   26 0xffffffff80200000 1f67a88  kernel
 2    1 0xffffffff82219000 5936     fdescfs.ko
 3    1 0xffffffff8221f000 a877     linprocfs.ko
 4    3 0xffffffff8222a000 7b0f     linux_common.ko
 5    1 0xffffffff82232000 bb55     tmpfs.ko
 6    1 0xffffffff8223e000 2986     uhid.ko
 8    1 0xffffffff82241000 3c93f    linux64.ko
 9    1 0xffffffff8227e000 42864    linux.ko
2、mount the /compat/linux/proc files and add configurations to /etc/fstab:
Code:
$ df -h
Filesystem      Size    Used   Avail Capacity  Mounted on
/dev/vtbd0p2    480G    3.8G    438G     1%    /
devfs           1.0K    1.0K      0B   100%    /dev
fdescfs         1.0K    1.0K      0B   100%    /dev/fd
procfs          4.0K    4.0K      0B   100%    /proc
linprocfs       4.0K    4.0K      0B   100%    /compat/linux/proc
tmpfs            19G    4.0K     19G     0%    /compat/linux/dev/shm
 
Excellent. Those appear to be in order.

Not sure if it's actually required, it's been a while since I last used the Linux Java packages, but is java/javavmwrapper installed?
 
Excellent. Those appear to be in order.

Not sure if it's actually required, it's been a while since I last used the Linux Java packages, but is java/javavmwrapper installed?
I find what's the problem real is, with root user linux-oracle-jdk works all right, but with others(even in wheel group), it doesn't work. Any suggestion?
 
Back
Top