2
votes

After recently installing Grails for a new project, my jboss install will not run. I get the following after running ./run.sh

Workhog:bin joenicora$ =========================================================================

JBoss Bootstrap Environment

JBOSS_HOME: /opt/jboss

JAVA: /usr/bin/java

JAVA_OPTS: -Dprogram.name=run.sh -Xms1024m -Xmx3072m -XX:MaxPermSize=1024m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

CLASSPATH: /opt/jboss/bin/run.jar

=========================================================================

Unable to locate an executable at "/usr/bin/java/bin/java" (-1)

OSX 10.7.5

java version "1.6.0_51"

my bash_profile: export JAVA_HOME=/Library/Java/Home

The path in this part of the message doesn't look right: "Unable to locate an executable at "/usr/bin/java/bin/java" (-1)". But changes to my bash_profile never update that path. Any idea what is causing this issue?

2
What is JAVA?is it JAVA_HOME? - ihsan kocak
Type "which java" does it say /usr/bin/java/bin/java? - Grammin
Workhog:bin joenicora$ which java /usr/bin/java - modulo
Ah, when I echo $JAVA it's blank, maybe that's the problem? what should $JAVA point to? - modulo
Na $JAVA should be blank, $JAVA_HOME is the var you car about - Grammin

2 Answers

0
votes

Your JAVA_HOME should point to /path/to/jdk/baseFolder not /usr/bin/java and add to PATH=.....:/path/to/jdk/baseFolder/bin

0
votes

What you need to do is:

cd /usr/bin
type ls -l 

This will show you all of the symbolic links in /usr/bin so look at user bin java it will look like:

lrwxrwxrwx. 1 root root   21 Jan 25  2013 java -> /usr/java/jdk1.6.0_35/bin/java 

Then go into you .bashrc/bash_profile and:

export JAVA_HOME=/usr/java/jdk1.6.0_35
export PATH=$JAVA_HOME/bin:$PATH

and you will be good to go.

Your problem is that you're setting $JAVA_HOME to your java exe and it needs to be set to the JAVA jdk.

$JAVA_HOME should be set to the folder directly above where /bin/java lives