shell script fails to start if JAVA_HOME is not set
---------------------------------------------------

                 Key: MOJO-792
                 URL: http://jira.codehaus.org/browse/MOJO-792
             Project: Mojo
          Issue Type: Bug
          Components: appassembler
         Environment: Linux, Bash 2.0.5
            Reporter: Max Berger


When JAVA_HOME is not set, from the generated run script, I receive the error 
message:

Error: JAVA_HOME is not defined correctly.
  We cannot execute java


The reason: The test [ ! -x "$JAVACMD" ] will only work if the absolute path is 
given in the JAVACMD.

Possible fixes:
- when JAVA_HOME is unset, instead of setting:
    JAVACMD=java
rather set
  JAVACMD=`which java`

alternative: change the test to
[ ! -x `which $JAVACMD` ]

I have seen this with version 1.0-alpha-2 and 1.0-20070124.085332-18

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to