File javawswrapper of Package jpackage-utils
#!/bin/bash
# /usr/local/java/bin/jarwrapper - the wrapper for binfmt_misc/jar
if [ $# -lt 1 ]
then
echo "Use this program to execute a Java Web Start file"
echo -e "\t$0 <file>.jnlp"
read
exit 1;
fi
if ! which javaws > /dev/null 2>&1
then
X_MESSAGE="No 'javaws' found in path ... can't start the java web start application
Perhaps you have to select a different Java Runtime Environment by calling as root:
/usr/sbin/update-alternatives --config java
Note: There is no Java Web Start for 64bit Java available!"
# try any of graphical dialogs
if [ ! -z $DISPLAY ]; then
if which kdialog > /dev/null 2>&1; then
kdialog --error "$X_MESSAGE"
exit 1
fi
if which zenity > /dev/null 2>&1; then
zenity --error --text="$X_MESSAGE"
exit 1
fi
if which Xdialog > /dev/null 2>&1; then
Xdialog --msgbox "${X_MESSAGE}" 11 80
exit 1
fi
fi
# there's no dialog program installed, or no DISPLAY variable, then echo the errror message
echo '***************************************************************************************'
echo "* No 'javaws' found in path ... can't start the java web start application *"
echo "* Perhaps you have to select a different Java Runtime Environment by calling as root: *"
echo "* /usr/sbin/update-alternatives --config java *"
echo "* Note: There is no Java Web Start for 64bit Java available! *"
echo '***************************************************************************************'
echo
echo
echo
echo Press key to continue
read
exit 1
fi
exec javaws $1