LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 04-25-2011, 12:23 PM   #1
SG86-
Member
 
Registered: Mar 2011
Posts: 40

Rep: Reputation: 2
Install wont find JRE- $JAVA_HOME


Hi, i have been googling and trying things for a few hours now but cannot get the installation of NeXpose to work

The error is:
Code:
    This application requires a Java Run Time Environment (JRE)
          to run. Searching for one on your computer was not successful.
          Please use the command line switch -is:javahome to specify
          a valid JRE.  For more help use the option -is:help
These results are from my Backtrack install, but i have tried on my main Mint 10 install, they are pretty similar

$ which java
/usr/bin/java

$ java -version
java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)

$ echo $PATH
/opt/kde3/bin:/opt/kde3/games:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/oracle/instantclient_10_2:/opt/oracle/instantclient_10_2

$ echo $JAVA_HOME
(empty)

I did
$ locate jre

and found the location of the jre install? from what ive googled this seems correct:
/usr/lib/jvm/java-6-sun-1.6.0.10/jre/ (of which contains /bin/java)

So i then added this to the JAVA_HOME variable

export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.10/jre/"

also added this to PATH

export PATH=$PATH:/usr/lib/jvm/java-6-sun-1.6.0.10/jre/

What am i missing here?

any more info just ask
 
Old 04-25-2011, 12:42 PM   #2
hf2046
Member
 
Registered: Mar 2011
Distribution: Slack64
Posts: 111

Rep: Reputation: 20
Does the command line switch is:javahome accept a path to your Java or JRE directory?
 
Old 04-25-2011, 12:49 PM   #3
SG86-
Member
 
Registered: Mar 2011
Posts: 40

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by hf2046 View Post
Does the command line switch is:javahome accept a path to your Java or JRE directory?
it doesnt seem so mate, does the path i posted seem correct? ive tried variations of that, + /usr/bin one

if i scroll up on the installation-type screen in terminal, i noticed this also:

Code:
Initializing InstallShield Wizard........
          Extracting Bundled JRE.
im wondering whether its something to do with how im running the .bin ?

$ sudo bash ./filename.bin

plain

$./filename.bin

does not work, and ive seen an installation of NeXpose tutorial in which it does

grrrr
 
Old 04-26-2011, 12:58 AM   #4
hf2046
Member
 
Registered: Mar 2011
Distribution: Slack64
Posts: 111

Rep: Reputation: 20
Quote:
Originally Posted by SG86- View Post

im wondering whether its something to do with how im running the .bin ?

$ sudo bash ./filename.bin
Usually to install a program, you need to be root, therefore the need for 'sudo'. You can try setting the JAVA_HOME environment variable or add it to the PATH as root.

Code:
sudo su
export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.10"
Then run chmod u+x on the .bin to make it executable.
 
Old 04-28-2011, 10:57 AM   #5
SG86-
Member
 
Registered: Mar 2011
Posts: 40

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by hf2046 View Post
Usually to install a program, you need to be root, therefore the need for 'sudo'. You can try setting the JAVA_HOME environment variable or add it to the PATH as root.

Code:
sudo su
export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.10"
Then run chmod u+x on the .bin to make it executable.
If you read my post fully you'll see i already did this?

Quote:
So i then added this to the JAVA_HOME variable

export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.10/jre/"

also added this to PATH

export PATH=$PATH:/usr/lib/jvm/java-6-sun-1.6.0.10/jre/

What am i missing here?
 
Old 04-29-2011, 05:03 AM   #6
hf2046
Member
 
Registered: Mar 2011
Distribution: Slack64
Posts: 111

Rep: Reputation: 20
Quote:
Originally Posted by SG86- View Post
If you read my post fully you'll see i already did this?
Sorry, but did you set the environment variable while logged in as root? That bit was unclear to me...

In any case, perhaps the -is:javahome switch does accept a path? Have you tried adding -is:javahome /usr/lib/jvm/java-6-sun-1.6.0.10 when you run the install script?

(By the way, in my experience, usually $JAVA_HOME is set to the top level directory of your Java installation, so even if the JRE is installed in ../../java/jre, you still set the variable to ../../java)

EDIT: I just looked at the install script, you can also add the option -is:log /path/to/log in order to save more information on what's happening with your install...

Last edited by hf2046; 04-29-2011 at 05:17 AM.
 
Old 04-30-2011, 10:28 AM   #7
SG86-
Member
 
Registered: Mar 2011
Posts: 40

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by hf2046 View Post
Sorry, but did you set the environment variable while logged in as root? That bit was unclear to me...

In any case, perhaps the -is:javahome switch does accept a path? Have you tried adding -is:javahome /usr/lib/jvm/java-6-sun-1.6.0.10 when you run the install script?

(By the way, in my experience, usually $JAVA_HOME is set to the top level directory of your Java installation, so even if the JRE is installed in ../../java/jre, you still set the variable to ../../java)

EDIT: I just looked at the install script, you can also add the option -is:log /path/to/log in order to save more information on what's happening with your install...
ok mate ill take another look quick, really annoying this as my mate just installed it fine running linux through virtual box lol
 
Old 04-30-2011, 10:36 AM   #8
SG86-
Member
 
Registered: Mar 2011
Posts: 40

Original Poster
Rep: Reputation: 2
ok, i ran the commands and the install under su, and it seems to work now, although it wont load the graphical install so im using -console switch

thanks for help
 
  


Reply



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_HOME defined but maven2 compains it could not find it tkmsr Linux - Software 5 10-22-2010 11:23 AM
Can't find JAVA_HOME, driving me crazy! Jayla Linux - Newbie 6 07-07-2008 08:20 AM
why cant xmms find my glib ??? They are there,it wont install Royyy Linux - Software 2 03-11-2007 12:01 PM
Tomcat5 doesn't find JAVA_HOME environment variable isra_mv Linux - Software 4 09-23-2006 01:42 PM
Java jre-1.3.1_02 can't find libjava.so after install rhammack Linux - Software 0 01-17-2002 09:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:23 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration