LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Problem with Java install in 64-current (http://www.linuxquestions.org/questions/slackware-14/problem-with-java-install-in-64-current-4175426803/)

J1NKL3 09-12-2012 01:12 AM

Problem with Java install in 64-current
 
FIXED: Turns out if you don't pay attention and use the Solaris package things don't work correctly... who knew? :redface:

Tried to install the JDK on my desktop last night and can't seem to get it working. It works fine on the laptop, but is giving me a weird error that I can't quite figure out. Anyone have any ideas or pointers? Let me know if you need more info. Thanks! It's the lastest 7u7 JDK.

uname -a
Code:

Linux tuxbox 3.2.28 #2 SMP Thu Aug 23 12:43:19 CDT 2012 x86_64 Intel(R) Core(TM)2 Quad CPU    Q8300  @ 2.50GHz GenuineIntel GNU/Linux
echo $PATH
Code:

/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/kde4/libexec:/usr/lib64/qt/bin:/usr/share/texmf/bin:.:usr/lib64/java/bin/amd64:/usr/sbin:/usr/bin:/sbin:/bin
file java
Code:

java: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), not stripped, uses FPU FXSR SSE
user@tuxbox:/usr/lib64/java/bin/amd64$ ./java
Code:

bash: ./java: No such file or directory
user@tuxbox:~$ java
Code:

bash: java: command not found

414N 09-12-2012 01:40 AM

The java binary should be located in /usr/lib64/java/bin, not inside an amd64 subdirectory.
Also note that the path you added to PATH is a relative one (it lacks a prepending /).
You shouldn't need to manually adjust PATH if you mark /etc/profile.d/jdk.sh as executable, though...

J1NKL3 09-12-2012 01:44 AM

Quote:

Originally Posted by 414N (Post 4778189)
The java binary should be located in /usr/lib64/java/bin, not inside an amd64 subdirectory.
Also note that the path you added to PATH is a relative one (it lacks a prepending /).
You shouldn't need to manually adjust PATH if you mark /etc/profile.d/jdk.sh as executable, though...

I'm sure I had the prepending / at one point during the install in my .bashrc but even after fixing that it doesn't run. jdk.sh does not exist in my /etc/profile.d

414N 09-12-2012 01:55 AM

I see. The installer probably messed up something...
Remove the JDK first using the installer as mentioned on this page, then repackage the installer itself using the SlackBuild you can find under extra/java in the Slackware-current tree.
You will obtain a .txz Slackware package which should work out of the box, then.

J1NKL3 09-12-2012 01:56 AM

Wow... how stupid do I feel right now? Just went back to the source directory and realized I downloaded the Solaris code instead of Linux :redface:

414N 09-12-2012 02:06 AM

Well, this explains a lot :)

J1NKL3 09-12-2012 02:07 AM

Quote:

Originally Posted by 414N (Post 4778206)
Well, this explains a lot :)

I still don't have /etc/profile.d/jdk.sh though... any idea how to get that so I won't have to modify the PATH?

414N 09-12-2012 02:11 AM

Have you repackaged the binary installer downloaded from Oracle's site with the SlackBuild?

J1NKL3 09-12-2012 02:16 AM

Quote:

Originally Posted by 414N (Post 4778213)
Have you repackaged the binary installer downloaded from Oracle's site with the SlackBuild?

Got it fixed with a little bit of Googling... thanks :)


All times are GMT -5. The time now is 02:41 AM.