[SOLVED] Slackware 15 64 - Not Properly set JAVA_HOME
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello,
i installed NetBeans which requires Java 8. Now i needed to install LibreOffice, which requires Java 11. I get an error that my java version is too low.
Code:
echo $JAVA_HOME
/usr/lib64/zulu-openjdk8
which java
/usr/lib64/zulu-openjdk11/bin/java
java --version
openjdk 11.0.21 2023-10-17 LTS
OpenJDK Runtime Environment Zulu11.68+17-CA (build 11.0.21+9-LTS)
OpenJDK 64-Bit Server VM Zulu11.68+17-CA (build 11.0.21+9-LTS, mixed mode)
please tell me how to proeprly set JAVA_HOME - perhaps LiberOffice checks there and that's why it fails.
and then it will remain in that konsole (or other x terminal you use), till you close it.
If you need to set it permanently, set it in your /home/user/.bashrc, for example.
Edit: for permanent configuration better use the method provided by Petri above ^^^
If they are both executable, they are sourced in alphabetical order.
Maybe 'chmod -x' them both, and logout/login. Then explicitly source one of them according to your need.
Code:
ls -l /etc/profile.d/*jdk*.sh
-rwxr-xr-x 1 root root 302 jan 14 21:47 /etc/profile.d/zulu-openjdk11.sh
-rwxr-xr-x 1 root root 157 jan 2 22:08 /etc/profile.d/zulu-openjdk8.sh
sorry, i do not know how to properly source the "right version"
Code:
checking the installed JDK... configure: error: JDK is too old, you need at least 9 (10800 < 10900)
Error: build failed.
An error occurred. Press Enter to return to main window ...
LibreOffice is able to be built with a number of jdk versions. Similarly, netbeans is able to run with a number of jdk versions. I just installed netbeans then removed zulu-openjdk8 and installed openjdk11. After that netbeans seemed to run OK.
Therefore my suggestion is to just removepkg zulu-jdk8. Until you then logout/login again (which will clean up your java environment) you'll probably still have to source zulu-openjdk11 as others have already mentioned.
chris
BTW - if netbeans maintainer sees this thread, netbeans is now at version 20. Having it depend on zulu-openjdk11 instead of zulu-openjdk8 would also fix the OP's problem.
You can set JAVA_HOME to the newer JDK and configure Netbeans
to point to the older JDK, just edit netbeans.conf, see snippit below.
Another option is to simply pass --jdkhome when launching Netbeans.
JAVA_HOME problem was sloved by just removing older jdks logging out and in again.
sorry for shifting the topic but libreoffice still fails to be built
Code:
checking which languages to be built... en de
checking for msgfmt... msgfmt
checking for msguniq... msguniq
configure: error: invalid language: 'en' (vs ''); supported languages are: en-US af am ar as ast be bg bn bn-IN bo br brx bs ca ca-valencia ckb cs cy da de dgo dsb dz el en-GB en-ZA eo es et eu fa fi fr fur fy ga gd gl gu gug he hsb hi hr hu id is it ja ka kab kk km kmr-Latn kn ko kok ks lb lo lt lv mai mk ml mn mni mr my nb ne nl nn nr nso oc om or pa-IN pl pt pt-BR ro ru rw sa-IN sat sd sr-Latn si sid sk sl sq sr ss st sv sw-TZ szl ta te tg th tn tr ts tt ug uk uz ve vec vi xh zh-CN zh-TW zu
Error: build failed.
something is not right with locale, but sure to where exactly fix that
It looks like you set LOLANGS="en de" but what you probably want is LOLANGS="de".
From the README:
Code:
1. support additional languages by overriding the LOLANGS variable,
whose default setting is LOLANGS="de es fr id it ja nl vi zh-CN".
Note that en-US is always added to whatever LOLANGS is set. Thus
building with, for example,
LOLANGS="de" sh LibreOffice.SlackBuild
would build LibreOffice with support for german and US english
languages.
If you really want to specify english despite it being included by default, then you could have LOLANGS="en-US de" as the configure error message explains.
chris
Last edited by chris.willing; 01-15-2024 at 02:44 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.