Linux-oracle-jdk10 root only?


#1

In previous versions of TrueOS, I have installed it according to its directions, and it was working fine.
https://www.freshports.org/java/linux-oracle-jdk10/

I did the same now on Trident, and it works, but only as root. As a regular user (in the wheel group), java -version stays stuck with 100% CPU and no message. I suppose it’s a matter of permissions in Trident, but I don’t know where to look. Can anybody help me, please?


#2

do you “need” that particular JDK package?

pkg info | grep jdk
openjdk8-8.192.26_3 Java Development Kit 8


#3

Yes. [random characters until 20…]


#4

yes? :slight_smile:

why that package?


#5

I am a Java developer, and I must support the newer versions of Java.


#6

where did you get the JDK package?


#7

Oracle website.

https://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase10-4425482.html


#8

You may want to run this in bhyve or virtualbox


#9

No. I just want to make it work for a regular user as it is working for root. (As it was working in previous versions of TrueOS.)


#10

what are the permissions of the files?


#11

root:wheel - read and execute.

For instance, this is the bin folder:

total 551
-r-xr-xr-x  1 root  wheel    9920 27 jun  2018 appletviewer
-r-xr-xr-x  1 root  wheel    9864 27 jun  2018 idlj
-r-xr-xr-x  1 root  wheel   11112 27 jun  2018 jaotc
-r-xr-xr-x  1 root  wheel    9864 27 jun  2018 jar
-r-xr-xr-x  1 root  wheel    9872 27 jun  2018 jarsigner
-r-xr-xr-x  1 root  wheel    9048 27 jun  2018 java
-r-xr-xr-x  1 root  wheel    9912 27 jun  2018 javac
-r-xr-xr-x  1 root  wheel    9920 27 jun  2018 javadoc
-r-xr-xr-x  1 root  wheel    9864 27 jun  2018 javap
-r-xr-xr-x  1 root  wheel    3101 25 jan 09:33 javapackager
-r-xr-xr-x  1 root  wheel  136032 27 jun  2018 javaws
-r-xr-xr-x  1 root  wheel    9864 27 jun  2018 jcmd
-r-xr-xr-x  1 root  wheel    9928 27 jun  2018 jconsole
-r-xr-xr-x  1 root  wheel   18960 27 jun  2018 jcontrol
-r-xr-xr-x  1 root  wheel    9864 27 jun  2018 jdb
-r-xr-xr-x  1 root  wheel    9872 27 jun  2018 jdeprscan
-r-xr-xr-x  1 root  wheel    9864 27 jun  2018 jdeps
-r-xr-xr-x  1 root  wheel    9864 27 jun  2018 jhsdb
-r-xr-xr-x  1 root  wheel    9872 27 jun  2018 jimage
-r-xr-xr-x  1 root  wheel    9912 27 jun  2018 jinfo
-r-xr-xr-x  1 root  wheel    9912 27 jun  2018 jjs
-r-xr-xr-x  1 root  wheel    9912 27 jun  2018 jlink
-r-xr-xr-x  1 root  wheel    9912 27 jun  2018 jmap
-r-xr-xr-x  1 root  wheel     143 27 jun  2018 jmc
-r-xr-xr-x  1 root  wheel    9864 27 jun  2018 jmod
-r-xr-xr-x  1 root  wheel    9864 27 jun  2018 jps
-r-xr-xr-x  1 root  wheel    9920 27 jun  2018 jrunscript
-r-xr-xr-x  1 root  wheel    9872 27 jun  2018 jshell
-r-xr-xr-x  1 root  wheel    9920 27 jun  2018 jstack
-r-xr-xr-x  1 root  wheel    9864 27 jun  2018 jstat
-r-xr-xr-x  1 root  wheel    9872 27 jun  2018 jstatd
-r-xr-xr-x  1 root  wheel   65952 27 jun  2018 jweblauncher
-r-xr-xr-x  1 root  wheel    9872 27 jun  2018 keytool
-r-xr-xr-x  1 root  wheel    9920 27 jun  2018 orbd
-r-xr-xr-x  1 root  wheel    9872 27 jun  2018 pack200
-r-xr-xr-x  1 root  wheel    9864 27 jun  2018 rmic
-r-xr-xr-x  1 root  wheel    9864 27 jun  2018 rmid
-r-xr-xr-x  1 root  wheel    9872 27 jun  2018 rmiregistry
-r-xr-xr-x  1 root  wheel    9872 27 jun  2018 schemagen
-r-xr-xr-x  1 root  wheel    9872 27 jun  2018 serialver
-r-xr-xr-x  1 root  wheel    9872 27 jun  2018 servertool
-r-xr-xr-x  1 root  wheel    9928 27 jun  2018 tnameserv
-r-xr-xr-x  1 root  wheel  112880 27 jun  2018 unpack200
-r-xr-xr-x  1 root  wheel    9864 27 jun  2018 wsgen
-r-xr-xr-x  1 root  wheel    9872 27 jun  2018 wsimport
-r-xr-xr-x  1 root  wheel    9864 27 jun  2018 xjc

#12

Perhaps something in the Linux compatibility layer should be checked, also?


#13

i’m not sure at this point


#14

Maybe this helps. If I run in a root session (using su), it works. But if I run using sudo as a regular user, it displays something:

sudo /usr/local/linux-oracle-jdk10/bin/java -version
/usr/local/linux-oracle-jdk10/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

Environment, perhaps?


#15

for me, it was installed JDK package


#16
Do the Oracle JDKs for Linux work under FreeBSD 12?
As Rod suggested, bhyve or VBox is a great way to test
in lieu of installing on bare metal.
John
groenveld@acm.org

#17
  1. Yes. As I said, they work on previous installations of TrueOS.
  2. They even work on Trident 18.12 - but only as root, here.

#18

my best guess, is a permission. from what you listed earlier, I have no idea what though


#19

Adding a little information, if it helps:

# ldd /usr/local/linux-oracle-jdk10/bin/java
/usr/local/linux-oracle-jdk10/bin/java:
	linux_vdso.so.1 =>  (0x00007ffffffff000)
	libz.so.1 => /lib64/libz.so.1 (0x0000000800a00000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x0000000800e00000)
	libjli.so => /usr/local/linux-oracle-jdk10/bin/../lib/jli/libjli.so (0x0000000801200000)
	libdl.so.2 => /lib64/libdl.so.2 (0x0000000801600000)
	libc.so.6 => /lib64/libc.so.6 (0x0000000801a00000)
	/lib64/ld-linux-x86-64.so.2 (0x0000000800600000)