Ir al contenido principal

Entradas

Destacados

Uninstall Java on MacOS

Normally when installing Java under the platform MacOS, there is not a simple way to uninstall it, and in some cases, there are several installed versions, for that you need access to several directories to achieve it. For that reason, I have made a script in which it is checked if Java exists in MacOS, the version that owns in that machine and the most important uninstall it. The script in bash is shown below. #!/bin/bash # Bash Java for MacOs PS3='Please enter your choices: ' options=("Java path" "Java Version" "Uninstall Java" "Quit") select opt in "${options[@]}" do     case $opt in         "Java path")    _java=java             version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')    if [ -z "$version" ] ; then     echo no Java    else which java    fi             ;;         "Java Version

Entradas más recientes