Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Zulu openJDK
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
nodiaque
n00b
n00b


Joined: 15 Jul 2005
Posts: 54

PostPosted: Tue Jan 05, 2021 5:18 pm    Post subject: Zulu openJDK Reply with quote

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
View user's profile Send private message
nodiaque
n00b
n00b


Joined: 15 Jul 2005
Posts: 54

PostPosted: Tue Jan 05, 2021 5:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30991
Location: here

PostPosted: Tue Jan 05, 2021 6:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
nodiaque
n00b
n00b


Joined: 15 Jul 2005
Posts: 54

PostPosted: Tue Jan 05, 2021 7:37 pm    Post subject: Reply with quote

problem is it wasn't an ebuild, just a tar.gz I unzipped and extract to a folder, ready to use.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30991
Location: here

PostPosted: Tue Jan 05, 2021 7:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
nodiaque
n00b
n00b


Joined: 15 Jul 2005
Posts: 54

PostPosted: Tue Jan 05, 2021 7:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
whitt
Tux's lil' helper
Tux's lil' helper


Joined: 28 Dec 2020
Posts: 131

PostPosted: Sun Aug 28, 2022 7:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
whitt
Tux's lil' helper
Tux's lil' helper


Joined: 28 Dec 2020
Posts: 131

PostPosted: Sun Aug 28, 2022 7:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
whitt
Tux's lil' helper
Tux's lil' helper


Joined: 28 Dec 2020
Posts: 131

PostPosted: Sat Sep 03, 2022 3:29 pm    Post subject: Reply with quote

just bumping to the top...

need to get zulu running to use TD Ameritrade's ToS application. thanks for any help!
Back to top
View user's profile Send private message
forrestfunk81
Guru
Guru


Joined: 07 Feb 2006
Posts: 565
Location: münchen.de

PostPosted: Wed Oct 12, 2022 12:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
mickyd
n00b
n00b


Joined: 06 Feb 2005
Posts: 12

PostPosted: Sun Nov 20, 2022 2:15 am    Post subject: alternate manual work around Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum