From 1a1d7a9e0271b11d8eecf6aca6a6a32a5a30d8d9 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 25 Sep 2019 07:51:47 +0200 Subject: Remove memory limit --- content/opt/davmail/davmail | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 content/opt/davmail/davmail (limited to 'content/opt/davmail') diff --git a/content/opt/davmail/davmail b/content/opt/davmail/davmail new file mode 100755 index 0000000..051bbdd --- /dev/null +++ b/content/opt/davmail/davmail @@ -0,0 +1,30 @@ +#!/bin/sh +# +# Usage: davmail [] +# +# In case of SWT crash under JDK 9/11, uninstall SWT or remove SWT cases below +# +BASE=`dirname $0` +# force GTK2 to avoid crash with OpenJDK 11 +JAVA_OPTS="-Dsun.net.inetaddr.ttl=60 -Djdk.gtk.version=2.2" +#JAVA_OPTS="-Xmx512M -Dsun.net.inetaddr.ttl=60 -Djdk.gtk.version=2.2" +JAVA=java +# uncomment this to force JDK 8 +#JAVA=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java +# add JFX to classpath with OpenJDK 11 +JFX_CLASSPATH=/usr/share/java/javafx-base.jar:/usr/share/java/javafx-controls.jar:/usr/share/java/javafx-fxml.jar:/usr/share/java/javafx-graphics.jar:/usr/share/java/javafx-media.jar:/usr/share/java/javafx-swing.jar:/usr/share/java/javafx-web.jar +if [ -e $BASE/davmail.jar ]; then + # this is the platform independent package + exec ${JAVA} $JAVA_OPTS -cp $BASE/davmail.jar:$BASE/lib/*:${JFX_CLASSPATH} davmail.DavGateway "$@" +elif [ -e /usr/share/java/swt.jar ]; then + # SWT 3 is available + export LD_LIBRARY_PATH=/usr/lib/jni + exec ${JAVA} $JAVA_OPTS -cp /usr/share/davmail/davmail.jar:/usr/share/java/swt.jar:${JFX_CLASSPATH}:/usr/share/davmail/lib/* davmail.DavGateway "$@" +elif [ -e /usr/share/java/swt4.jar ]; then + # SWT 4 is available, force GTK 2 in SWT + export LD_LIBRARY_PATH=/usr/lib/jni + export SWT_GTK3=0 + exec ${JAVA} $JAVA_OPTS -cp /usr/share/davmail/davmail.jar:/usr/share/java/swt4.jar:${JFX_CLASSPATH}:/usr/share/davmail/lib/* davmail.DavGateway "$@" +else + exec ${JAVA} $JAVA_OPTS -cp /usr/share/davmail/davmail.jar:/usr/share/davmail/lib/*:${JFX_CLASSPATH} davmail.DavGateway "$@" +fi -- cgit v1.2.3