diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-09-25 07:51:47 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-09-25 07:51:47 +0200 |
commit | 1a1d7a9e0271b11d8eecf6aca6a6a32a5a30d8d9 (patch) | |
tree | be4db2945800005cd519907353e6cf36fdce87bb | |
parent | 39bff56f9b32ea626b74b3462352786cae59c72a (diff) | |
download | davmail-1a1d7a9e0271b11d8eecf6aca6a6a32a5a30d8d9.tar.gz davmail-1a1d7a9e0271b11d8eecf6aca6a6a32a5a30d8d9.tar.bz2 davmail-1a1d7a9e0271b11d8eecf6aca6a6a32a5a30d8d9.tar.xz davmail-1a1d7a9e0271b11d8eecf6aca6a6a32a5a30d8d9.zip |
Remove memory limit
-rwxr-xr-x | content/opt/davmail/davmail | 30 |
1 files changed, 30 insertions, 0 deletions
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 [</path/to/davmail.properties>] +# +# 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 |