GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use spaces instead of tabs. Check plugins directory for Mozilla · chrishantha/install-java@102247e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • uninstall-java.sh
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎uninstall-java.sh‎

Copy file name to clipboardExpand all lines: uninstall-java.sh
+10-8Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ confirm () {
4545

4646
# Make sure the script is running as root.
4747
if [ "$UID" -ne "0" ]; then
48-
echo "You must be root to run $0. Try following"; echo "sudo $0";
49-
exit 9
48+
echo "You must be root to run $0. Try following"; echo "sudo $0";
49+
exit 9
5050
fi
5151

5252

@@ -74,14 +74,16 @@ fi
7474
commands=( "jar" "java" "javac" "javadoc" "javah" "javap" "javaws" "jcmd" "jconsole" "jarsigner" "jhat" "jinfo" "jmap" "jmc" "jps" "jstack" "jstat" "jstatd" "jvisualvm" "keytool" "policytool" "wsgen" "wsimport" )
7575

7676
if (confirm "Run update-alternatives commands?"); then
77-
echo "Running update-alternatives --remove for ${commands[@]} mozilla-javaplugin.so"
77+
echo "Running update-alternatives --remove for ${commands[@]} mozilla-javaplugin.so"
7878

79-
for i in "${commands[@]}"
80-
do
81-
sudo update-alternatives --remove "$i" "$java_dist_dir/bin/$i"
82-
done
79+
for i in "${commands[@]}"
80+
do
81+
sudo update-alternatives --remove "$i" "$java_dist_dir/bin/$i"
82+
done
8383

84-
sudo update-alternatives --remove "mozilla-javaplugin.so" "$java_dist_dir/jre/lib/amd64/libnpjp2.so"
84+
if [[ -d "/usr/lib/mozilla/plugins/" ]]; then
85+
sudo update-alternatives --remove "mozilla-javaplugin.so" "$java_dist_dir/jre/lib/amd64/libnpjp2.so"
86+
fi
8587
fi
8688

8789
if (confirm "Remove directory '$java_dist_dir'?"); then

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.