Erro de ativação do SmartGit / Hg

0

Para um projeto pessoal, tenho tentado fazer com que SmartGit / Hg seja executado em uma unidade portátil. Para fazer isso, estou usando a versão "genérica" que é executada apenas em Java. Infelizmente, toda vez que tento lançá-lo, os seguintes erros aparecem:

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

Como este é um programa comercial, não posso verificar legalmente nenhum dos arquivos mencionados para erros. Se alguém já trabalhou com o SmartGit / Hg e sabe como corrigir esse erro, agradeço muito qualquer ajuda. Espero que não seja muito específico de uma questão para ser removido da listagem, uma vez que não consegui encontrar nenhuma outra informação sobre os erros.

Ligeira adição à informação: O iniciador que está sendo usado é derivado do seguinte arquivo .sh:

#!/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" "$@"
    
por mnadareski 28.10.2013 / 00:28

1 resposta

0

No meu caso, não estava usando o X Window no meu ciXwin corretamente. Eu precisava lembrar de iniciar meu SSH com:

$ ssh -Y vagrant@localhost

Eu sei que você pode não estar usando o mesmo sistema que o meu, mas isso pode lhe dar algo para continuar!

    
por 02.03.2014 / 19:06

Tags