[OSM-talk] [PATCH] Improve startup script for stand alone applet execution

Petter Reinholdtsen pere at hungry.com
Sun Mar 19 12:19:24 GMT 2006


Here is a patch to make it easier to run the java applet from the
command line with different java engines, and also easier to adjust
the runtime options.  Please apply to svn.

Index: runapplet.sh
===================================================================
--- runapplet.sh        (revision 902)
+++ runapplet.sh        (working copy)
@@ -1,3 +1,20 @@
 #/bin/sh
-echo run me with user and pass
-java -cp dist/OSMApplet.jar:dist/MinML2.jar:dist/commons-codec-1.3.jar:dist/commons-httpclient-3.0-rc3.jar:dist/commons-logging.jar:dist/core.jar:dist/plugin.jar processing.core.PApplet org.openstreetmap.processing.OsmApplet --user=$1 --pass=$2
+#
+# Execute the Openstreetmap.org java applet from the command line
+
+if [ -z "$2" ] ; then
+    echo "Usage: $0 <emailaddr> <password>"
+    exit 1
+fi
+
+[ -n "$JAVA" ] || JAVA=java
+
+distdir=`dirname $0`/dist
+
+OSMCLASSPATH="$distdir/OSMApplet.jar:$distdir/MinML2.jar:$distdir/commons-codec-1.3.jar:$distdir/commons-httpclient-3.0-rc3.jar:$distdir/commons-logging.jar:$distdir/core.jar:$distdir/plugin.jar"
+
+exec $JAVA $JAVAOPTS \
+    -cp $OSMCLASSPATH \
+    processing.core.PApplet \
+    org.openstreetmap.processing.OsmApplet \
+    --user=$1 --pass=$2





More information about the talk mailing list