LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-18-2012, 06:05 AM   #1
Barx
Member
 
Registered: Jun 2004
Distribution: Slack x86 current
Posts: 126

Rep: Reputation: 16
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
 
Old 10-18-2012, 06:10 AM   #2
solarfields
Member
 
Registered: Feb 2006
Location: Outer Shpongolia
Distribution: Slackware
Posts: 468

Rep: Reputation: 118Reputation: 118
may be it's a stupid suggestion, but did you try just restarting the computer?
 
Old 10-18-2012, 06:54 AM   #3
tramni1980
Member
 
Registered: Jul 2006
Location: Tübingen, Germany
Distribution: Slackware64-13.37
Posts: 737

Rep: Reputation: 37
Quote:
Originally Posted by Barx View Post
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
 
Old 10-18-2012, 07:32 AM   #4
audriusk
Member
 
Registered: Mar 2011
Location: Klaipėda, Lithuania
Distribution: Slackware
Posts: 248

Rep: Reputation: 107Reputation: 107
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.
 
Old 10-18-2012, 02:55 PM   #5
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 227Reputation: 227Reputation: 227
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.
 
1 members found this post helpful.
Old 10-19-2012, 02:36 AM   #6
Barx
Member
 
Registered: Jun 2004
Distribution: Slack x86 current
Posts: 126

Original Poster
Rep: Reputation: 16
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
 
Old 10-20-2012, 10:20 AM   #7
angryfirelord
Member
 
Registered: Dec 2005
Posts: 498

Rep: Reputation: 59
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.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java applet not loading image with relative path but loads image with absolute path amolgupta Programming 2 07-20-2009 01:58 PM
set up java_home path in /home/user/.bashrc but use path in /usr/lib/java vitalstrike82 Slackware 4 01-13-2009 11:25 PM
Ubuntu 7.10 64bit - how to set java path to/redirect java to libjvm.so ? Thane Ubuntu 1 03-25-2008 05:52 PM
export Path=/usr/java:$Path does not seem to work lumix Linux - Newbie 1 03-19-2007 03:11 PM
Java can't find package, but PATH set correctly (j2se1.4.0, java.util.regex package) Ethan Programming 5 02-06-2004 09:55 PM


All times are GMT -5. The time now is 07:21 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration