LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   java not in PATH (http://www.linuxquestions.org/questions/slackware-14/java-not-in-path-4175432867/)

Barx 10-18-2012 07:05 AM

java not in PATH
 
Hi

maybe it's my fault .. but maybe not :-)

I've installed JRE 7u7 using the slackbuild from /extra/java

The package was created and installed successfully.

But if I type 'java' on the shell I get a command not found error (both as root or user)

So I think that the java executable is not on the PATH.

Of course a symlink or a PATH addiction will fix .. but I expect that this should be done automatically by the script in the package installer.

I've tried to investigate the slackbuild but I'm unable to find where this should be done; do can someone help me to investigate what's gone wrong?

Thank you all

Alessandro Barisone

solarfields 10-18-2012 07:10 AM

may be it's a stupid suggestion, but did you try just restarting the computer?

tramni1980 10-18-2012 07:54 AM

Quote:

Originally Posted by Barx (Post 4808976)
Hi

I've installed JRE 7u7 using the slackbuild from /extra/java

The "java" command resides in /usr/lib64/java/bin for a 64 bit Slackware and in
/usr/lib/java/bin for 32 bit Slackware. Please check that:
1. the file /var/log/packages/jre-bla-bla contains the line /usr/lib64/java/bin/java
2. that "echo $PATH" confirms the presence of /usr/lib64/java/bin in your PATH

audriusk 10-18-2012 08:32 AM

Path to JRE binaries is set up in /etc/profile.d/jre.sh shell script. Log out and log in again after installing JRE package for it to take effect, or even simpler, source that file:
Code:

$ source /etc/profile.d/jre.sh
The latter will work for the currently used shell only.

mRgOBLIN 10-18-2012 03:55 PM

You might have made the same mistake I once made...

Make sure you have all of the source files in the directory with the SlackBuild (including the profile.d directory) when you build the package.

Barx 10-19-2012 03:36 AM

Solved! first of all, I forgot to download the profile.d folder before creating the package (thank you audriusk); second, a logout-login puts java in the path correctly (thank you mRgOBLIN)

Regards,

Alessandro

angryfirelord 10-20-2012 11:20 AM

Just as an additional note, AlienBob has packages of OpenJDK 7 for 14.0.

http://taper.alienbase.nl/mirrors/pe...dk/pkg64/14.0/

Installing the package will also add java to the appropriate path automatically.


All times are GMT -5. The time now is 10:34 PM.