[SOLVED] jdk builds and installs but doesn't work?
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.
Distribution: Slackware 15.0, Slackware 14.2_x64, Slackware 14.1 x86
Posts: 612
Rep:
jdk builds and installs but doesn't work?
I just built and installed (thrice) jdk trying to get java to work on this newly installed 14.2 x86 system. When I try to start (for example) OpenOffice Writer, nothing happens and I see a complaint (in konsole) about no java.
This is one of those things I've *never* had go wrong since I started using Slackware. The jdk 'just worked'. I've logged out and back in, even rebooted, but nothing is getting the system to see it has java now.
Any ideas? (I honestly don't have the time to try and build 'openjdk' since this is just an AMD Athlon II X2 250 and will take all weekend to build and mom's gotta be able to use this thing while I'm not here)
How did you build it? When it is finished, there should be a file in your /etc/profile.d/ (since I use Eric's openjdk package, it is called openjdk.sh -- I'm guessing the regular one would just be jdk.sh) and it should be executable. It is what is used to set the PATH for java and a few other environment variables. Do you have that file and is it executable?
Just for reference, your java executable should be /usr/lib{64}/java/bin/java. If you can run that file manually, then it just means your environment variables aren't set up. If you can't run it, then something else has gone wrong with the installation.
Distribution: Slackware 15.0, Slackware 14.2_x64, Slackware 14.1 x86
Posts: 612
Original Poster
Rep:
@Richard - Here's what I got back with those commands and they both look correct(?):
Code:
bash-4.3$ echo $JAVA_HOME
/usr/lib/java
bash-4.3$ $JAVA_HOME/bin/java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) Server VM (build 25.102-b14, mixed mode)
As for what bassmadrigal brought up, I have the /usr/lib/javaxxx *and* a /usr/lib/jdkxxx. The /usr/lib/jdkxxx is exactly the same as the java but it's has a link arrow on it. It seems maybe it's not sending commands to the java that's supposed to be used...does that sound like it makes sense? If I want to make it link myself, should I make it a sym; hard; or redirect link (those are the choices I'm given when I use krusader, my file manager of choice)?
Distribution: Slackware 15.0, Slackware 14.2_x64, Slackware 14.1 x86
Posts: 612
Original Poster
Rep:
This is what happens when one is tired as can be, sweating all over the keyboard after working outside in 90 degree weather and 90% humidity...I'd installed jdk just fine, but forgot it was a copy of the jdk for *MY* system - which is x86_64.
I downloaded the correct jdk this time, did the rpm2tgz thing installed all of those tgz's and all is well now.
Sorry for the mixup and wasting anyones time and thanks too for the help anyway.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.