LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Install wont find JRE- $JAVA_HOME (https://www.linuxquestions.org/questions/linux-software-2/install-wont-find-jre-%24java_home-877000/)

SG86- 04-25-2011 01:23 PM

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

hf2046 04-25-2011 01:42 PM

Does the command line switch is:javahome accept a path to your Java or JRE directory?

SG86- 04-25-2011 01:49 PM

Quote:

Originally Posted by hf2046 (Post 4335807)
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

hf2046 04-26-2011 01:58 AM

Quote:

Originally Posted by SG86- (Post 4335816)

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.

SG86- 04-28-2011 11:57 AM

Quote:

Originally Posted by hf2046 (Post 4336394)
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?

hf2046 04-29-2011 06:03 AM

Quote:

Originally Posted by SG86- (Post 4339524)
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...

SG86- 04-30-2011 11:28 AM

Quote:

Originally Posted by hf2046 (Post 4340423)
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

SG86- 04-30-2011 11:36 AM

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


All times are GMT -5. The time now is 04:49 PM.