First new (build) dependencies added: antlr3-runtime, jna.
[debian/jabref.git] / debian / jabref-wrapper
index 8f8c3058c4e5838b6e9b8072f722ba6f6b7e16aa..4a1f9abb11187a093ad0510f324e462d855f745c 100644 (file)
@@ -1,15 +1,30 @@
 #!/bin/sh
 
-# jabref wrapper script
-# code for java detection borrowed from tuxguitar
+# Include the wrappers utility script
+. /usr/lib/java-wrappers/java-wrappers.sh
 
-if [ -z "$JAVA_HOME" ] ; then
-       t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t
-       t=/usr/lib/jvm/java-6-sun && test -d $t && JAVA_HOME=$t
-       t=/usr/lib/jvm/java-7-icedtea && test -d $t && JAVA_HOME=$t
-       test -n "$JAVA_HOME" && JAVA=${JAVA_HOME}/jre/bin/java
-fi
+# We need a java6 runtime (openjdk[876], oracle[87], sun6).
+find_java_runtime java6
 
-export JAVA=${JAVA:=java}
+find_jars \
+       jabref \
+       JPFCodeGenerator-rt \
+       antlr \
+       antlr3 \
+       antlr3-runtime \
+       commons-logging \
+       glazedlists \
+       jempbox \
+       jgoodies-common \
+       jgoodies-forms \
+       jgoodies-looks \
+       jna \
+       jpf \
+       jpf-boot \
+       microba \
+       mysql-connector-java \
+       pdfbox \
+       postgresql \
+       spin
 
-exec $JAVA -jar /usr/share/java/jabref.jar "$@"
+run_java net.sf.jabref.JabRefMain "$@"