[jboss-jira] [JBoss JIRA] (WFLY-1392) jconcole.sh - correct PATH for calling jconsole

Frank Langelage (JIRA) jira-events at lists.jboss.org
Mon Aug 19 19:09:26 EDT 2013


    [ https://issues.jboss.org/browse/WFLY-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797771#comment-12797771 ] 

Frank Langelage commented on WFLY-1392:
---------------------------------------

Don't understand your comment.
That's what I see in jconsole.sh from WildFly head, nothing changed by someone else.

If you have set $JAVA, you disable the check for JAVA_HOME.
# Setup the JVM
if [ "x$JAVA" = "x" ]; then
    if [ "x$JAVA_HOME" != "x" ]; then
        JAVA="$JAVA_HOME/bin/java"
    else
        echo "JAVA_HOME is not set. Unable to locate the jars needed to run jconsole."
        exit 2
    fi
fi

And there currently is no $JCONSOLE in this script.
You might introduce a variable $JCONSOLE as $JAVA_HOME/bin/jconsole in this script, if you like.

Every script seems to be different in kind of checking $JAVA, $JAVA_HOME, etc.
wsconsume.sh e.g. if $JAVA is not set, $JAVA is set to "java" and used then as eval \"$JAVA\" $JAVA_OPTS ...
So executable java is searched along $PATH.
But CLASSPATH is build from using $JAVA_HOME: JBOSS_CLASSPATH=$JAVA_HOME/lib/tools.jar:$JBOSS_HOME/jboss-modules.jar

                
> jconcole.sh - correct PATH for calling jconsole 
> ------------------------------------------------
>
>                 Key: WFLY-1392
>                 URL: https://issues.jboss.org/browse/WFLY-1392
>             Project: WildFly
>          Issue Type: Bug
>          Components: Scripts
>    Affects Versions: 8.0.0.Alpha1
>            Reporter: Frank Langelage
>            Assignee: Brian Stansberry
>            Priority: Minor
>
> jconsole.sh checks for correct setting of JAVA_HOME and adds libraries from JAVA_HOME to the CLASSPATH.
> But at the end, jconsole is called with out path.
> So if jconsole is found somewhere else this is used.
> Last line shoud be changed from
> jconsole -J-Djava.class.path="$CLASSPATH"
> to 
> $JAVA_HOME/bin/jconsole -J-Djava.class.path="$CLASSPATH"
> to make sure that libs and bin are used from the same directory.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list