LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   jdk builds and installs but doesn't work? (https://www.linuxquestions.org/questions/slackware-14/jdk-builds-and-installs-but-doesnt-work-4175589186/)

FTIO 09-10-2016 06:37 PM

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)

Richard Cranium 09-10-2016 06:45 PM

What does
Code:

echo $JAVA_HOME
output? If that seems sane, how about
Code:

$JAVA_HOME/bin/java -version
?

bassmadrigal 09-10-2016 09:07 PM

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.

FTIO 09-11-2016 07:03 AM

@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)?

FTIO 09-11-2016 07:42 AM

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.


All times are GMT -5. The time now is 01:20 PM.