aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/run-java-tool')
-rw-r--r--src/run-java-tool13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/run-java-tool b/src/run-java-tool
index 811fa94..21f4768 100644
--- a/src/run-java-tool
+++ b/src/run-java-tool
@@ -1,18 +1,23 @@
#!/bin/bash
if [[ -n ${GENTOO_VM} ]]; then
- vmpath=/etc/java-config/vms/${GENTOO_VM}/
+ vmpath=/usr/lib/jvm/${GENTOO_VM}/
elif [[ -h ${HOME}/.gentoo/user-vm ]]; then
vmpath=${HOME}/.gentoo/user-vm/
else
- vmpath=/etc/java-config/vms/system-vm/
+ vmpath=/etc/java-config/system-vm/
fi
tool=$(basename $0)
bin=${vmpath}/bin/${tool}
+jrebin=${vmpath}/jre/bin/${tool}
-if [[ -x ${bin} ]]; then
+if [[ -x ${bin} ]]; then
exec ${bin} "${@}"
+elif [[ -x ${jrebin} ]]; then
+ exec ${jrebin} "${@}"
else
- echo "Want too run ${bin} but it does not exist or is not executable" >&2
+ echo "Want too run ${vmpath}/{,jre}/bin/${tool} but it does not exist or is not executable" >&2
exit 1
fi
+
+