LimeWire i jego skrypt
gruszek@pogodanet.pl
gruszek w pogodanet.pl
Nie, 29 Maj 2005, 16:22:36 CEST
sciagnalem osatnio LimeWire (P2P) i mam problem z jego uruchomieniem, po
wpisaniu limewire w konsoli otrzymuje komunikat:
runLime.sh[25]: syntax error: `(' unexpected
i klops.
moze przytocze zawarotsc tego skryptu bo nie kazdemu musi sei chciec
sciagac ten program (niestety ja sie nie znam na skryptach shella a ten
program jest w javie i uruchamiany tym skryptem):
-------------------
#!/bin/sh
#
# Runs LimeWire. This script must be executed in your LimeWire
# install directory.
# try to discover java
MSG0="Loading LimeWire:"
MSG1="Starting LimeWire..."
MSG2="Java exec found in "
MSG3="OOPS, your java version is too old "
MSG4="You need to upgrade to JRE 1.4.x or newer from http://www.java.com"
MSG5="Suitable java version found "
MSG6="Configuring environment..."
MSG7="OOPS, you don't seem to have a valid JRE. LimeWire works best with
Sun JRE available at http://www.java.com "
MSG8="OOPS, unable to locate java exec in "
MSG9=" hierarchy"
MSG10="Java exec not found in PATH, starting auto-search..."
MSG11="Java exec found in PATH. Verifying..."
look_for_java()
{
JAVADIR=/usr/java
IFS=$'\n'
potential_java_dirs=(`ls -1 "$JAVADIR" | sort | tac`)
IFS=
for D in "${potential_java_dirs[@]}"; do
if [[ -d "$JAVADIR/$D" && -x "$JAVADIR/$D/bin/java" ]]; then
JAVA_PROGRAM_DIR="$JAVADIR/$D/bin/"
echo $MSG2 $JAVA_PROGRAM_DIR
if check_version ; then
return 0
else
return 1
fi
fi
done
echo $MSG8 "${JAVADIR}/" $MSG9 ; echo $MSG4
return 1
}
check_version()
{
JAVA_HEADER=`${JAVA_PROGRAM_DIR}java -version 2>&1 | head -n 1`
JAVA_IMPL=`echo ${JAVA_HEADER} | cut -f1 -d' '`
if [ "$JAVA_IMPL" = "java" ] ; then
VERSION=`echo ${JAVA_HEADER} | sed "s/java version \"\(.*\)\"/\1/"`
if echo $VERSION | grep "^1.[0-3]" ; then
echo $MSG3 "[${JAVA_PROGRAM_DIR}java = ${VERSION}]" ; echo $MSG4
return 1
else
echo $MSG5 "[${JAVA_PROGRAM_DIR}java = ${VERSION}]" ; echo $MSG6
return 0
fi
else
echo $MSG7 "[${JAVA_PROGRAM_DIR}java = ${JAVA_IMPL}]" ; echo $MSG4
return 1
fi
}
echo $MSG1
# locate and test the java executable
if [ `uname` = "Linux" ]; then
if ! command -v java &>/dev/null; then
echo $MSG10
if ! look_for_java ; then
exit 1
fi
else
echo $MSG11
if ! check_version ; then
if ! look_for_java ; then
exit 1
fi
fi
fi
else
JAVA_PROGRAM_DIR=""
fi
echo $MSG0
export J2SE_PREEMPTCLOSE=1
${JAVA_PROGRAM_DIR}java
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
-Djava.library.path=. -jar LimeWire.jar
if [ $? -ne 0 ]; then
echo
echo
"******************************************************************"
echo "Something went wrong with LimeWire."
echo "Maybe you're using the wrong version of Java?"
echo "(LimeWire is tested against and works best with with Sun's
JRE, Java 1.4+)"
echo "The version of Java in your PATH is:"
java -version
echo
fi
--------------------
mam nadzieje ze mi ktos pomoze :)
Więcej informacji o liście dyskusyjnej pld-users-pl