SmartGit/Hg launch error

0

For a personal project, I've been trying to get SmartGit/Hg to run from a portable drive. To do this, I am using the "generic" version that runs on Java alone. Unfortunately, every time I try to launch it, the following errors show up:

Error invoking SmartGit/Hg
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at QBootLoader.main(SourceFile:112)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Display
    at com.syntevo.q.gui.cl.a(SourceFile:43)
    at smartgit.Xl.a(SourceFile:320)
    at smartgit.anQ.a(SourceFile:229)
    at smartgit.anQ.b(SourceFile:185)
    at smartgit.anQ.a(SourceFile:72)
    at smartgit.anR.a(SourceFile:114)
    at smartgit.anR.call(SourceFile:111)
    at com.syntevo.q.gui.cl.a(SourceFile:84)
    at smartgit.anQ.a(SourceFile:111)
    at smartgit.XA.b(SourceFile:62)
    at SmartGit.main(SourceFile:11)
    ... 5 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Display
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 16 more

Since this is a commercial program, I cannot legally check any of the files mentioned for errors. If anyone has worked with SmartGit/Hg and knows how to fix this error, I would greatly appreciate any assistance. I hope is not too specific of a question to be removed from the listing since I could not find any other information on the errors.

Slight addition to information: The launcher that is being used is derived from the following supplied .sh file:

#!/bin/bash
#
# Normally, editing this script should not be required.
#
# To specify an alternative Java Runtime Environment, set the environment variable SMARTGITHG_JAVA_HOME

if [ "$SMARTGITHG_JAVA_HOME" = "" ] ; then
    SMARTGITHG_JAVA_HOME=$SMARTGIT_JAVA_HOME
fi
if [ "$SMARTGITHG_JAVA_HOME" = "" ] && [ -f "/usr/lib/jvm/java-7-openjdk-i386/jre/bin/java" ] ; then
    SMARTGITHG_JAVA_HOME="/usr/lib/jvm/java-7-openjdk-i386/jre/bin/java"
fi
if [ "$SMARTGITHG_JAVA_HOME" = "" ] ; then
    SMARTGITHG_JAVA_HOME=$JAVA_HOME
fi

if [ "$SMARTGITHG_MAX_HEAP_SIZE" = "" ] ; then
    SMARTGITHG_MAX_HEAP_SIZE=$SMARTGIT_MAX_HEAP_SIZE
fi
if [ "$SMARTGITHG_MAX_HEAP_SIZE" = "" ] ; then
    SMARTGITHG_MAX_HEAP_SIZE=256m
fi

# this seems necessary for Solaris to find the Cairo-library
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/gnome-private/lib

_JAVA_EXEC="java"
if [ "$SMARTGITHG_JAVA_HOME" != "" ] ; then
    _TMP="$SMARTGITHG_JAVA_HOME/bin/java"
    if [ -f "$_TMP" ] ; then
        if [ -x "$_TMP" ] ; then
            _JAVA_EXEC="$_TMP"
        else
            echo "Warning: $_TMP is not executable"
        fi
    else
        echo "Warning: $_TMP does not exist"
    fi
fi

if ! which "$_JAVA_EXEC" >/dev/null ; then
    echo "Error: No java environment found"
    exit 1
fi

#
# Resolve the location of the SmartGit/Hg installation.
# This includes resolving any symlinks.
PRG=$0
while [ -h "$PRG" ]; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null`
    if expr "$link" : '^/' 2> /dev/null >/dev/null; then
        PRG="$link"
    else
        PRG="`dirname "$PRG"`/$link"
    fi
done

SMARTGIT_BIN=`dirname "$PRG"`

# absolutize dir
oldpwd=`pwd`
cd "${SMARTGIT_BIN}"; SMARTGIT_BIN=`pwd`
cd "${oldpwd}"; unset oldpwd

SMARTGIT_HOME=`dirname "$SMARTGIT_BIN"`

# The next line is to work around following SWT bug:
# https://bugs.eclipse.org/bugs/show_bug.cgi?id=419729
UBUNTU_MENUPROXY=0

_VM_PROPERTIES="-Dsun.io.useCanonCaches=false"

# Uncomment the following line to change the location where SmartGit/Hg should store
# settings (the given example path will make SmartGit/Hg portable by storing the settings
# in the installation directory):
#_VM_PROPERTIES="$_VM_PROPERTIES -Dsmartgit.settings=\${smartgit.installation}/.smartgit"

$_JAVA_EXEC $_VM_PROPERTIES -Xmx${SMARTGITHG_MAX_HEAP_SIZE} -Xverify:none -Dsmartgit.vm-xmx=${SMARTGITHG_MAX_HEAP_SIZE} -jar "$SMARTGIT_HOME/lib/bootloader.jar" "$@"

mnadareski

Posted 2013-10-27T23:28:08.123

Reputation: 61

Answers

0

In my case it was not using X windows in my ciXwin correctly. I needed to remember to start my SSH with:

$ ssh -Y vagrant@localhost

I realize you may not be using the same system as mine, but that might give you something to go on!

Thomas Green

Posted 2013-10-27T23:28:08.123

Reputation: 1