LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-01-2011, 12:24 PM   #1
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 14.10
Posts: 271

Rep: Reputation: 25
Java in PATH but not found by applications?


I'm setting up a RHEL 4 VM and have installed Oracle Java 1.6 from a bin file to /opt. I've added it into the PATH but when I try to run a installer that needs Java to run it says that it can't find a Java installation in my PATH but when I execute a which java I get the following:

Quote:
# which java
/usr/bin/which: no java in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/opt/jre1.6.0_23/bin/java:/root/bin:$/opt/jre1.6.0_23/bin/:$)
#
Can anyone tell me what's going on here?
 
Old 02-01-2011, 12:49 PM   #2
John VV
Guru
 
Registered: Aug 2005
Posts: 13,278

Rep: Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775
Quote:
I've added it into the PATH but when I try to run a installer that needs Java
informing us as to what this " installer " is would help
rhel4 .? .0.1.2.3.4.5.6.7.8 or the CURRENT 4.9 ???
point what ???

rhel4 might not be supported by this program ( is is locked into 5 year old code after all)

also will the current java 1.6 even run on rhel4.0 ???
 
Old 02-01-2011, 01:05 PM   #3
ADxD_7
Member
 
Registered: May 2007
Location: CO
Distribution: Solaris , Redhat , Debian
Posts: 152

Rep: Reputation: 23
I would say show us with an ls -al exactly where java is please - also I may have just never seen it but whats with the "$" in your path? All you should need (if java is in /opt/jre1.6.0_23/bin) is /opt/jre1.6.0_23/bin in your path....
 
Old 02-01-2011, 01:14 PM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,390
Blog Entries: 1

Rep: Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109
with Java, sometimes you have to set the "Java_Home" variable instead.

/root/.bash_profile

Quote:
export JAVA_HOME=/usr/java
 
Old 02-02-2011, 11:38 AM   #5
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 14.10
Posts: 271

Original Poster
Rep: Reputation: 25
#uname -ar
Linux <hostname> 2.6.9-42.ELsmp #1 SMP <date> i686 i686 i386 GNU/Linux
#

The installer is InstallAnywhere.

According to this:
http://www.java.com/en/download/help/6000011000.xml
Java 6 is supported.

# ls /opt/jre1.6.0_23/
bin javaws man README Welcome.html
COPYRIGHT lib plugin THIRDPARTYLICENSEREADME.txt
#
Don't know what you want this for, but there you go.

Also, I tried setting JAVA_HOME to /opt/jre1.6.0_23 where I instyalled it and logged off and on again but it made no difference.
 
Old 02-02-2011, 02:02 PM   #6
ADxD_7
Member
 
Registered: May 2007
Location: CO
Distribution: Solaris , Redhat , Debian
Posts: 152

Rep: Reputation: 23
Quote:
Originally Posted by Mark_667 View Post
#uname -ar
Linux <hostname> 2.6.9-42.ELsmp #1 SMP <date> i686 i686 i386 GNU/Linux
#

The installer is InstallAnywhere.

According to this:
http://www.java.com/en/download/help/6000011000.xml
Java 6 is supported.

# ls /opt/jre1.6.0_23/
bin javaws man README Welcome.html
COPYRIGHT lib plugin THIRDPARTYLICENSEREADME.txt
#
Don't know what you want this for, but there you go.

Also, I tried setting JAVA_HOME to /opt/jre1.6.0_23 where I instyalled it and logged off and on again but it made no difference.
What I really wanted was an ls of /opt/jre1.6.0_23/bin but thats cool - I just want to actually see the java executable in case it is a link that is not working as many times "java" is just a link to the current version - can you run /opt/jre1.6.0_23/bin/java? Is it even there? This is at least the starting point of finding the problem - I mean at this point we need to figure out if it is a problem with the way java was installed or if it is a path issue or something else entirely.
 
Old 02-02-2011, 02:48 PM   #7
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
You need to remove the '/opt/jre1.6.0_23/bin/java' entry and remove the '$' from the last entry for starters.
 
Old 02-02-2011, 04:48 PM   #8
John VV
Guru
 
Registered: Aug 2005
Posts: 13,278

Rep: Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775
what is this " installer " that can not find the different install of java .
Different than the base default .

that program might be the problem.
 
Old 02-03-2011, 06:39 AM   #9
alar
Member
 
Registered: Sep 2003
Location: Canada
Distribution: CentOS 5.5, Ubuntu 10.04, Linux Mint 11 gnome 64 bit
Posts: 336

Rep: Reputation: 36
The program is the problem, it's Oracle installer.
szboardstretcher is correct

with Java, sometimes you have to set the "Java_Home" variable instead.

/root/.bash_profile


Quote:
export JAVA_HOME=/usr/java
 
Old 02-03-2011, 11:30 AM   #10
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 14.10
Posts: 271

Original Poster
Rep: Reputation: 25
Quote:
can you run /opt/jre1.6.0_23/bin/java?
Yes, just executing that command gives me a usage page for it.
Quote:
You need to remove the '/opt/jre1.6.0_23/bin/java' entry and remove the '$' from the last entry for starters.
Done, I also set JAVA_HOME while I was in there, I logged out and in again for the PATH changes to take affect but it didn't make any difference.
 
  


Reply

Tags
java, path


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
set up java_home path in /home/user/.bashrc but use path in /usr/lib/java vitalstrike82 Slackware 4 01-14-2009 12:25 AM
No Java virtual machine could be found from your PATH stefaandk *BSD 2 09-28-2008 09:11 PM
export Path=/usr/java:$Path does not seem to work lumix Linux - Newbie 1 03-19-2007 04:11 PM
ErrorMessage "Java virtual machine could be found from your PATH .. What do i Do ? murbz Linux - Software 18 11-09-2004 06:30 AM
"No Java virtual machine could be found from your PATH" - ignores bashrc shaider Linux - Software 7 10-09-2004 01:38 AM


All times are GMT -5. The time now is 11:35 AM.

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