1 THIS_JRE='java-7-openjdk/jre'
4 if [ ! -x /usr/bin/java ]; then
5 /usr/bin/archlinux-java unset
8 /usr/bin/archlinux-java get
13 default=$(fix_default)
16 /usr/bin/archlinux-java set ${THIS_JRE}
18 ${THIS_JRE} | ${THIS_JRE/\/jre})
22 echo "Default Java environment is already set to '${default}'"
23 echo "See 'archlinux-java help' to change it"
27 xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
28 echo "when you use a non-reparenting window manager,"
29 echo "set _JAVA_AWT_WM_NONREPARENTING=1 in /etc/profile.d/jre.sh"
31 # update-desktop-database -q
35 if [ -z $(fix_default) ]; then
36 /usr/bin/archlinux-java set ${THIS_JRE}
39 xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
41 # update-desktop-database -q
45 if [ "x$(fix_default)" = "x${THIS_JRE/\/jre}" ]; then
46 /usr/bin/archlinux-java unset
47 echo "No Java environment is set as default anymore"
52 xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
54 # update-desktop-database -q