Java install: JAVA_HOME seems to be missing
Hi, I used the instructions from here:
https://docs.slackware.com/howtos:software:java I got the latest version for linux from Oracle's website. The version I downloaded is jdk-9_linux_x64_bin.tar.gz and with java.SlackBuild it was turned into jdk-9_linux-i586-1.txz. The install doesn't seem to have worked correctly. The java website to test the install doesn't detect java. I am trying to install another software with sbopkg and it looks for java as a dependency, but there is an error about java missing. The instructions from the referenced link say that JAVA_HOME is /usr/lib64/java, but I don't have anything like that: Code:
find /usr -name java Quote:
|
You need to log out and then log back in. It should hopefully run the profile script that will set the java variables.
|
Quote:
JDK 9 does things differently than earlier versions; you'll probably have some issues compiling and/or running various java programs with it. Given that JDK 9 was released only 3 days ago, I'd suggest that you start with the latest version of JDK 8 for now. |
bassmadrigal, I restarted then tried to check the java variables and the website and nothing was different. I think that Richard Cranium might be on to something. I will see if I can uninstall this and use JDK 8 instead.
|
I've always used this command to make sure that my browsers use/see it...
EXPLOIT_ME=YES ./jdk.SlackBuild Bleh, never mind. I just looked at it and it isn't setup the same at all as the 8 series. We're just gonna have to wait for one ot the smarter minds that knows how to do so to make the new SlackBuild for this new series. |
Quote:
JDK8 is pretty well supported, so hopefully you can use that without issue. But as others have mentioned, the SlackBuild does disable the java plugin by default because there are a lot of possible attack vectors with it. If you really need it, you need to run the SlackBuild with EXPLOIT_ME=YES jdk.SlackBuild, to hopefully let you know that the chances of being exploited with it are high and it is not recommended. If you are just using the website to check if your java is installed, it isn't worth it to install the java plugin. All you need to do to verify java is installed is run java. If it comes back with an error message, things aren't set up as they should be. If it dumps the help file, then it's likely installed correctly. |
bassmadrigal, thanks for the info. I was not aware of the disabled plugin. I'm going to try v8.x.
|
bassmadrigal, thanks for the info. I was not aware of the disabled plugin.
I used jdk-8u144-linux-x64.tar.gz from http://www.oracle.com/technetwork/ja...s-2133151.html I followed the instructions I referenced at start of the thread and I still get: Code:
bash-4.2$ which java Quote:
|
Did you log off and then log back on? The program adds a script to your /etc/profile.d/ directory to set up the correct variables, but you need to log off and log back on for it to take effect.
|
Yes, I logged out and back in.
|
Yes, I logged out and back in.
/etc/profile.d has no files with java in the name. |
Oh, did you install the package after you ran the SlackBuild? It should be in /tmp/. The SlackBuild doesn't install the packages automatically... it just creates them.
Code:
installpkg /tmp/jdk-8u144-x86_64-1_SBo.tgz |
Backing up a little bit, at first, instead of
Code:
installpkg Code:
upgradepkg --install-new Code:
installpkg Code:
which java You refer to /tmp/jdk-8u144-x86_64-1_SBo.tgz So then I noticed the "SBo" in your latest reply. The file I downloaded was Quote:
Quote:
|
Oh, you're probably using the SlackBuild from extra/. To be honest, I'm not sure if that's been worked for JDK8 and was probably originally designed for JDK7... it's been years since I've used it in favor of the one on SlackBuilds. This one will add the required files into your /etc/profile.d/
https://slackbuilds.org/repository/1...velopment/jdk/ You can simply just download the SlackBuild tarball, extract it, move the jdk file into it and then run that. Once it is done, install that package, replacing the other one. Code:
wget https://slackbuilds.org/slackbuilds/14.2/development/jdk.tar.gz |
bassmadrigal, that did it. Thank you very much!
|
All times are GMT -5. The time now is 01:18 AM. |