[Webfunds-commits] html/download/zip run
Ian Grigg
iang@cypherpunks.ai
Mon, 28 Aug 2000 10:13:13 -0400 (AST)
iang 00/08/28 10:13:13
Modified: download/zip run
Log:
1.6.4
Revision Changes Path
1.11 +74 -30 html/download/zip/run
Index: run
===================================================================
RCS file: /home/webfunds/cvsroot/html/download/zip/run,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- run 2000/08/21 18:15:29 1.10
+++ run 2000/08/28 14:13:12 1.11
@@ -1,14 +1,17 @@
#
# *DON'T* change these two, rather, create a file "runlocal"
-# and set jdk and swing
+# and set JAVAHOME and SWING (latter for 1.1 only) in that file.
#
-jdks="/usr/local/jdk/jdk1.1.8 /usr/local/jdk1.1.8"
+# See the file README.html for additional instructions on how
+# to run WebFunds.
+#
+jdks="/usr/local/linux-jdk1.2.2 /usr/local/jdk/jdk1.1.8 /usr/local/jdk1.1.8"
swings="/usr/local/share/java/classes/swingall.jar /usr/local/jdk/swingall.jar"
#
-# You should set the location of the JDK and SWING in this .runlocal
-# which will never be overwritten by the distribution.
+# You should set the location of the JDK and SWING (1.1 only)
+# in this .runlocal which will never be overwritten by the distribution.
#
runlocal=./runlocal
if [ -r ${runlocal} ]
@@ -16,45 +19,86 @@
. ${runlocal}
fi
-#
-# Search for a Swing library and a JVM.
-#
-for j in $SWING $swing ${swings}
-do
- if [ -r ${j} ]
- then
- export SWING=${j}
- break
- fi
-done
+swing=""
+java11=false
-for j in $JAVA $jdk ${jdks}
+for j in $JDK $JAVAHOME $JAVA $jdk ${jdks} $(which java)
do
- if [ -d ${j} -a -r ${j}/bin/java ]
+ if [ -d ${j} -a -x ${j}/bin/java ]
then
export java=${j}/bin/java
- break
+ elif [ -f ${j} -a -x ${j} ]
+ then
+ export java=${j}
+ else
+ next
fi
+
+ version=$(${java} -version 2>&1 |
+ sed \
+ -e 's/.*\("[0-9][0-9.]*"\)/\1/' \
+ -e '2,$d' \
+ -e 's/"//g'
+ )
+
+ case "${version}" in
+ 1.1.*)
+ java11=true
+ #
+ # Search for a Swing library for JDK 1.1
+ #
+ for j in $SWING $swing ${swings}
+ do
+ if [ -r ${j} ]
+ then
+ swing=${j}
+ break
+ fi
+ done
+ if [ -r "${swing}" ]
+ then
+ swing=${swing}:
+ else
+ echo "No Swing found, WebFunds won't work!"
+ fi
+ echo "found Java 1.1 in ${java} $swing"
+ ;;
+
+ 1.2.*)
+ echo "found Java 1.2 in ${java}"
+ ;;
+
+ 1.3.*)
+ echo "found Java 1.3 in ${java} - NOT SUPPORTED YET"
+ ;;
+
+ *)
+ echo "no version: <<$version>> in ${java} (ignoring, not JVM)"
+ next
+ ;;
+ esac
+
+ break # successful, found JVM
+
done
-if [ -r "${java}" -a -r "${SWING}" ]
+[ -r "${java}" ] || echo "No JAVA found, WebFunds won't work!"
+
+# these shouldn't need to change
+cryptix_jars=cryptix-jce-api.jar:cryptix-jce-provider.jar:cryptix-openpgp.jar:Cryptix.jar
+if $java11
then
- echo "found Java in ${java}"
- echo "found Swing in ${SWING}"
+ cryptix_jars=cryptix-jce-compat.jar:${cryptix_jars}
+ sox_jars=${cryptix_jars}:SOX.jar
+ export CLASSPATH=${sox_jars}:${swing}:WebFunds.jar:$MORE_JARS
else
- [ -r "${java}" ] || echo "No JAVA found, WebFunds won't work!"
- [ -r "${SWING}" ] || echo "No SWING found, WebFunds won't work!"
+ sox_jars=${cryptix_jars}:SOX.jar
+ export CLASSPATH=${sox_jars}:WebFunds.jar:$MORE_JARS
fi
-
-# these shouldn't need to change
-cryptix_jars=cryptix-jce-compat.jar:cryptix-jce-api.jar:cryptix-jce-provider.jar:cryptix-openpgp.jar:Cryptix.jar
-sox_jars=${cryptix_jars}:SOX.jar
-export CLASSPATH=${sox_jars}:${SWING}:WebFunds.jar:$MORE_JARS
-
# preserves a log so errors can be sent straight to WebFunds bug central.
echo "Note, errors now kept in the file stderr"
-mv -f stderr stderr.old
+[ -f stderr ] && mv -f stderr stderr.old
echo $CLASSPATH > stdcp
${java} webfunds.client.Core