View previous topic :: View next topic |
Author |
Message |
nodiaque n00b
Joined: 15 Jul 2005 Posts: 54
|
Posted: Tue Jan 05, 2021 5:18 pm Post subject: Zulu openJDK |
|
|
Hello everyone,
I'm trying to do something that should be simple but is not. Installing Zulu openJDK. I followed part of the instruction on there website, starting with downloading the jdk here:
https://www.azul.com/downloads/zulu-community/?version=java-11-lts&os=linux&package=jdk
extract the tar and move the content to /opt/zulu11. Then, I create a symbolic link in /usr/lib/jvm that point to it.
This is working great, I now see both my old and new jvm in eselect
Code: | eselect java-vm list
Available Java Virtual Machines:
grep: /usr/share/java-config-2/vm/zulu-jdk-11.0.9.1: No such file or directory
[1] oracle-jdk-bin-1.8
[2] zulu-jdk-11.0.9.1 system-vm |
But once I set system to zulu-jdk and I try to run java, I get this message:
Code: | java
* java is not available for zulu-jdk-11.0.9.1 on x86_64
* IMPORTANT: some Java tools are not available on some VMs on some architectures
|
What I don't get it is why I have this message. java is present in the same path, either ./bin or ./jre/bin and if I put full path to /opt/zulu11/bin/java, it work.
Thank you! |
|
Back to top |
|
|
nodiaque n00b
Joined: 15 Jul 2005 Posts: 54
|
Posted: Tue Jan 05, 2021 5:34 pm Post subject: |
|
|
it seems all I had to do is to create a file under /usr/share/java-config2/vm with the same name and put the path and everything in it like oracle (I simply copied and paste back). wonder if there's a way to generate this file instead |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30991 Location: here
|
Posted: Tue Jan 05, 2021 6:58 pm Post subject: |
|
|
nodiaque wrote: | wonder if there's a way to generate this file instead |
This file is created in ebuild you can see skel in /var/db/repos/gentoo/dev-java/openjdk/files/openjdk-11.env.sh, in my system for openjdk-11 file become
Code: | # Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
VERSION="OpenJDK 11.0.9_p11"
JAVA_HOME="/usr/lib64/openjdk-11"
JDK_HOME="/usr/lib64/openjdk-11"
JAVAC="${JAVA_HOME}/bin/javac"
PATH="${JAVA_HOME}/bin"
ROOTPATH="${JAVA_HOME}/bin"
LDPATH="${JAVA_HOME}/lib/:${JAVA_HOME}/lib/server/"
MANPATH=""
PROVIDES_TYPE="JDK JRE"
PROVIDES_VERSION="11"
BOOTCLASSPATH=""
GENERATION="2"
ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH"
VMHANDLE="openjdk-11"
BUILD_ONLY="FALSE" |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
nodiaque n00b
Joined: 15 Jul 2005 Posts: 54
|
Posted: Tue Jan 05, 2021 7:37 pm Post subject: |
|
|
problem is it wasn't an ebuild, just a tar.gz I unzipped and extract to a folder, ready to use. |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30991 Location: here
|
Posted: Tue Jan 05, 2021 7:41 pm Post subject: |
|
|
I know but you can try to create file manually, like openjdk example I posted, and put it in /usr/share/java-config-2/vm/ _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
nodiaque n00b
Joined: 15 Jul 2005 Posts: 54
|
Posted: Tue Jan 05, 2021 7:42 pm Post subject: |
|
|
oh yeah, that's what I did and it solved it. Just unsure if all I put in it is ok but seems to be running fine.
Thanks! |
|
Back to top |
|
|
whitt Tux's lil' helper
Joined: 28 Dec 2020 Posts: 131
|
Posted: Sun Aug 28, 2022 7:27 pm Post subject: |
|
|
i'm running into a similar problem... i downloaded the tar file, and placed in /opt/ and made a link w/ friendlier name: Code: | [root /opt %] ls -aol
total 32
drwxr-xr-x 8 root 4096 Aug 28 14:38 .
drwxr-xr-x 22 root 4096 Nov 26 2021 ..
drwxr-xr-x 4 root 4096 Dec 17 2019 amdgpu-pro
drwxr-xr-x 6 root 4096 Aug 27 14:28 brave
drwxr-xr-x 3 root 4096 Feb 21 2021 google
-rw-r--r-- 1 root 0 Jan 13 2021 .keep
lrwxrwxrwx 1 root 21 Aug 28 13:38 openjdk-bin-17 -> openjdk-bin-17.0.3_p7
drwxr-xr-x 9 root 4096 Aug 28 13:38 openjdk-bin-17.0.3_p7
drwxr-xr-x 3 root 4096 Jan 19 2021 spotify
drwxr-xr-x 10 root 4096 Jun 23 13:54 zulu18.32.11-ca-jdk18.0.2-linux_x64
lrwxrwxrwx 1 root 37 Aug 28 14:38 zulujdk-bin-18.0.2 -> ./zulu18.32.11-ca-jdk18.0.2-linux_x64
[root /opt %] |
and i created /usr/share/java-config-2/vm/zulujdk-bin-18.0.2: Code: | [root /opt %] cat /usr/share/java-config-2/vm/zulujdk-bin-18.0.2
VERSION="Zulu Open JDK 18"
JAVA_HOME="/opt/zulu18.32.11-ca-jdk18.0.2-linux_x64"
JDK_HOME="/opt/zulu18.32.11-ca-jdk18.0.2-linux_x64"
JAVAC="${JAVA_HOME}/bin/javac"
PATH="${JAVA_HOME}/bin"
ROOTPATH="${JAVA_HOME}/bin"
LDPATH="${JAVA_HOME}/lib/:${JAVA_HOME}/lib/server/"
MANPATH=""
PROVIDES_TYPE="JDK JRE"
PROVIDES_VERSION="18"
BOOTCLASSPATH=""
GENERATION="2"
ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH"
VMHANDLE="zulujdk-bin-18"
BUILD_ONLY="FALSE"
[root /opt %] |
but when i list using eselect, i get: Code: | [root /opt %] eselect java-vm list
Available Java Virtual Machines:
grep: /usr/share/java-config-2/vm/zulu-jdk-18.0.2: No such file or directory
[1] openjdk-bin-17 system-vm
[2] zulu-jdk-18.0.2
[root /opt %] |
which confuses me, because 1) /usr/share/java-config-2/vm/zulu-jdk-18.0.2 shouldn't be a directory anyway, right? and 2) i set up the zulu config file to mirror the openjdk file...
what did i do incorrectly?
needless to say, if i set it to (2) and run java, i get an error: Code: | [root /opt %] eselect java-vm set 2
[root /opt %] java
* java is not available for zulu-jdk-18.0.2 on x86_64
* IMPORTANT: some Java tools are not available on some VMs or some architectures
[root /opt %] |
so clearly something is broken...
thanks! |
|
Back to top |
|
|
whitt Tux's lil' helper
Joined: 28 Dec 2020 Posts: 131
|
Posted: Sun Aug 28, 2022 7:30 pm Post subject: |
|
|
i'm running into a similar problem... i downloaded the tar file, and placed in /opt/ and made a link w/ friendlier name: Code: | [root /opt %] ls -aol
total 32
...
lrwxrwxrwx 1 root 21 Aug 28 13:38 openjdk-bin-17 -> openjdk-bin-17.0.3_p7
drwxr-xr-x 9 root 4096 Aug 28 13:38 openjdk-bin-17.0.3_p7
drwxr-xr-x 10 root 4096 Jun 23 13:54 zulu18.32.11-ca-jdk18.0.2-linux_x64
lrwxrwxrwx 1 root 37 Aug 28 14:38 zulujdk-bin-18.0.2 -> ./zulu18.32.11-ca-jdk18.0.2-linux_x64
[root /opt %] |
and i created /usr/share/java-config-2/vm/zulujdk-bin-18.0.2: Code: | [root /opt %] cat /usr/share/java-config-2/vm/zulujdk-bin-18.0.2
VERSION="Zulu Open JDK 18"
JAVA_HOME="/opt/zulu18.32.11-ca-jdk18.0.2-linux_x64"
JDK_HOME="/opt/zulu18.32.11-ca-jdk18.0.2-linux_x64"
JAVAC="${JAVA_HOME}/bin/javac"
PATH="${JAVA_HOME}/bin"
ROOTPATH="${JAVA_HOME}/bin"
LDPATH="${JAVA_HOME}/lib/:${JAVA_HOME}/lib/server/"
MANPATH=""
PROVIDES_TYPE="JDK JRE"
PROVIDES_VERSION="18"
BOOTCLASSPATH=""
GENERATION="2"
ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH"
VMHANDLE="zulujdk-bin-18"
BUILD_ONLY="FALSE"
[root /opt %] |
but when i list using eselect, i get: Code: | [root /opt %] eselect java-vm list
Available Java Virtual Machines:
grep: /usr/share/java-config-2/vm/zulu-jdk-18.0.2: No such file or directory
[1] openjdk-bin-17 system-vm
[2] zulu-jdk-18.0.2
[root /opt %] |
which confuses me, because 1) /usr/share/java-config-2/vm/zulu-jdk-18.0.2 shouldn't be a directory anyway, right? and 2) i set up the zulu config file to mirror the openjdk file...
what did i do incorrectly?
needless to say, if i set it to (2) and run java, i get an error: Code: | [root /opt %] eselect java-vm set 2
[root /opt %] java
* java is not available for zulu-jdk-18.0.2 on x86_64
* IMPORTANT: some Java tools are not available on some VMs or some architectures
[root /opt %] |
so clearly something is broken...
thanks! |
|
Back to top |
|
|
whitt Tux's lil' helper
Joined: 28 Dec 2020 Posts: 131
|
Posted: Sat Sep 03, 2022 3:29 pm Post subject: |
|
|
just bumping to the top...
need to get zulu running to use TD Ameritrade's ToS application. thanks for any help! |
|
Back to top |
|
|
forrestfunk81 Guru
Joined: 07 Feb 2006 Posts: 565 Location: münchen.de
|
Posted: Wed Oct 12, 2022 12:11 pm Post subject: |
|
|
Does it work without using Gentoo VM configuration? Like
Code: | export JAVA_HOME="/your/path/to/zulu-jdk/"
export PATH=$JAVA_HOME/bin:$PATH
java -version |
_________________ # cd /pub/
# more beer |
|
Back to top |
|
|
mickyd n00b
Joined: 06 Feb 2005 Posts: 12
|
Posted: Sun Nov 20, 2022 2:15 am Post subject: alternate manual work around |
|
|
i use thinkorswim and i love the customization of gentoo. after thinkorswim upgraded to java 11 from java 8, i didn't know how to get it to work until i came across an ubuntu solution:
download TOS recommended Java Zulu 11 from their official website:
http://www.azul.com/downloads
unzip the download to home folder:
tar -xzvf zuluPackage.tar.gz
verify it is working:
/home/user/installation_folder/bin/java -version
i made a custom script similar to the ubuntu solution:
#!/bin/bash
export PATH=/home/user/zulu11.60.19-ca-jdk11.0.17-linux_x64/bin/:$PATH
/home/user/thinkorswim/thinkorswim
and got it working! i tried emerging openjdk ver 11 but that did not work for me. thinkorswim complained that there was not enough memory.
hopefully this helps others |
|
Back to top |
|
|
|