Forum Discussion

electrum's avatar
12 years ago

Problem running loadUI-cmd.command on mac

Hi,

When I attempt to run the loadUI-cmd.command script on OSX 10.9, I get the following:

Error: Main method not found in class com.eviware.loadui.launcher.LoadUICommandLineLauncher, please define the main method as:
public static void main(String[] args)

Am I missing something obvious here? Any ideas?

This is what my loadUI-cmd.command looks like:

#!/bin/sh
### ====================================================================== ###
## ##
## loadUI Agent Bootstrap Script ##
## ##
### ====================================================================== ###

### $Id$ ###

DIRNAME=`dirname $0`

# OS specific support (must be 'true' or 'false').
cygwin=false;
case "`uname`" in
CYGWIN*)
cygwin=true
;;
esac

# Setup LOADUI_HOME
if [ "x$LOADUI_AGENT_HOME" = "x" ]
then
# get the full path (without any relative bits)
LOADUI_AGENT_HOME=`cd $DIRNAME/; pwd`
fi
export LOADUI_AGENT_HOME

LOADUI_AGENT_CLASSPATH="$LOADUI_AGENT_HOME:$LOADUI_AGENT_HOME/lib/*:$LOADUI_AGENT_HOME/../../PlugIns/jre.bundle/Contents/Home/jre/lib/*"

# For Cygwin, switch paths to Windows format before running java
if $cygwin
then
LOADUI_AGENT_HOME=`cygpath --path -w "$LOADUI_AGENT_HOME"`
LOADUI_AGENT_CLASSPATH=`cygpath --path -w "$LOADUI_AGENT_CLASSPATH"`
fi

JAVA="../../PlugIns/jre.bundle/Contents/Home/jre/bin/java"

if [ ! -d "$JAVA" ]; then
JAVA="java"
fi

JAVA_OPTS="-Xms128m -Xmx768m -XX:MaxPermSize=128m"

$JAVA $JAVA_OPTS -cp "$LOADUI_AGENT_CLASSPATH" com.eviware.loadui.launcher.LoadUICommandLineLauncher "$@"

1 Reply

  • Hello,
    Thanks for finding this. Looks like the "loadUI-cmd.command" script is not doing what is should be. On a brighter note, i think i fixed it.

    I attached the updated file to this message. Please try to use that instead and see if it works.

    I will also make sure that this fix is included in the next release.

    Regards,
    Max
    LoadUI developer