Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

Zulu openJDK

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
11 posts • Page 1 of 1
Author
Message
nodiaque
n00b
n00b
Posts: 54
Joined: Fri Jul 15, 2005 1:37 am

Zulu openJDK

  • Quote

Post by nodiaque » Tue Jan 05, 2021 5:18 pm

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-com ... ackage=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: Select all

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: Select all

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!
Top
nodiaque
n00b
n00b
Posts: 54
Joined: Fri Jul 15, 2005 1:37 am

  • Quote

Post by nodiaque » Tue Jan 05, 2021 5:34 pm

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
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Tue Jan 05, 2021 6:58 pm

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: Select all

# 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.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
nodiaque
n00b
n00b
Posts: 54
Joined: Fri Jul 15, 2005 1:37 am

  • Quote

Post by nodiaque » Tue Jan 05, 2021 7:37 pm

problem is it wasn't an ebuild, just a tar.gz I unzipped and extract to a folder, ready to use.
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Tue Jan 05, 2021 7:41 pm

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.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
nodiaque
n00b
n00b
Posts: 54
Joined: Fri Jul 15, 2005 1:37 am

  • Quote

Post by nodiaque » Tue Jan 05, 2021 7:42 pm

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!
Top
whitt
Apprentice
Apprentice
Posts: 156
Joined: Mon Dec 28, 2020 10:56 pm

  • Quote

Post by whitt » Sun Aug 28, 2022 7:27 pm

i'm running into a similar problem... i downloaded the tar file, and placed in /opt/ and made a link w/ friendlier name:

Code: Select all

[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: Select all

[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: Select all

[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: Select all

[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!
Top
whitt
Apprentice
Apprentice
Posts: 156
Joined: Mon Dec 28, 2020 10:56 pm

  • Quote

Post by whitt » Sun Aug 28, 2022 7:30 pm

i'm running into a similar problem... i downloaded the tar file, and placed in /opt/ and made a link w/ friendlier name:

Code: Select all

[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: Select all

[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: Select all

[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: Select all

[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!
Top
whitt
Apprentice
Apprentice
Posts: 156
Joined: Mon Dec 28, 2020 10:56 pm

  • Quote

Post by whitt » Sat Sep 03, 2022 3:29 pm

just bumping to the top...

need to get zulu running to use TD Ameritrade's ToS application. thanks for any help!
Top
forrestfunk81
Guru
Guru
User avatar
Posts: 567
Joined: Tue Feb 07, 2006 12:33 pm
Location: münchen.de

  • Quote

Post by forrestfunk81 » Wed Oct 12, 2022 12:11 pm

Does it work without using Gentoo VM configuration? Like

Code: Select all

export JAVA_HOME="/your/path/to/zulu-jdk/"
export PATH=$JAVA_HOME/bin:$PATH
java -version
# cd /pub/
# more beer
Top
mickyd
n00b
n00b
Posts: 12
Joined: Sun Feb 06, 2005 6:26 pm

alternate manual work around

  • Quote

Post by mickyd » Sun Nov 20, 2022 2:15 am

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
Top
Post Reply

11 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic