summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/swt')
-rw-r--r--dev-java/swt/README2
-rwxr-xr-xdev-java/swt/runtest2.sh15
2 files changed, 14 insertions, 3 deletions
diff --git a/dev-java/swt/README b/dev-java/swt/README
index 4426c2c..4d0ebf8 100644
--- a/dev-java/swt/README
+++ b/dev-java/swt/README
@@ -1,5 +1,5 @@
======== Instructions for >=dev-java-swt-3.2.2-r1 =========
-To run the test, execute runtest2.sh
+To run the test, execute runtest2.sh <swt-slot>
The test should load http://www.eclipse.org to a window. This window does not
seem to close properly so just pkill -9 java if you don't have anything else
diff --git a/dev-java/swt/runtest2.sh b/dev-java/swt/runtest2.sh
index 857d38e..be1e3d7 100755
--- a/dev-java/swt/runtest2.sh
+++ b/dev-java/swt/runtest2.sh
@@ -1,7 +1,18 @@
#!/bin/bash
-[[ ! -e Snippet128.class ]] && javac -classpath $(java-config -p swt-3) Snippet128.java
+if [[ ${#} != 1 ]]; then
+ echo "Usage: $0 <swt-slot>"
+ echo "Example: $0 3.4"
+ exit
+fi
+
+SLOT="${1}"
+
+echo "compiling..."
+[[ ! -e Snippet128.class ]] && javac -classpath $(java-config -p swt-${SLOT}) Snippet128.java
export CLASSPATH="."
-gjl_package=swt-3
+gjl_package=swt-3.4
gjl_main="Snippet128"
+echo "Running..."
+GJL_DEBUG=1
source /usr/share/java-config-2/launcher/launcher.bash