zoukankan      html  css  js  c++  java
  • How to uninstall (remove) JAVA from OS X Lion

    Open terminal (Applications -> Utilities -> Terminal)

    To remove JVM enter folowing:

    sudo rm -rf /System/Library/Java/JavaVirtualMachines/

    Then, clean up the installer records by removing them from /private/var/db/receipts/:

    com.apple.pkg.JavaForMacOSX107.bom
    com.apple.pkg.JavaForMacOSX107.plist

    Now clear any traces of the Java installation from Software Update.

    Please copy following file to your Desktop /Library/Receipts/InstallHistory.plist by entering following string in terminal:

    sudo cp /Library/Receipts/InstallHistory.plist ~/Desktop

    Change permissions on it

    chown yourusername:staff ~/Desktop/InstallHistory.plist

    Open it in TextEdit and find following: com.apple.pkg.JavaEssentials, remove all dict section which containing this line (it may be several of them)

    Example of one of the records:

    <dict>
    <key>date</key>
    2012-04-13T22:13:59Z
    <key>displayName</key>
    <string>Java for OS X 2012-003</string>
    <key>displayVersion</key>
    <string></string>
    <key>packageIdentifiers</key>
    <array>
    <string>com.apple.pkg.JavaEssentials</string>
    <string>com.apple.pkg.JavaForMacOSX107</string>
    <string>com.apple.pkg.JavaSecurity</string>
    </array>
    <key>processName</key>
    <string>Installer</string>
    </dict>

    When you are finished with cleaning, save this file, exit from texedit. Then change permissions to original by entering

    sudo chown root:wheel ~/Desktop/InstallHistory.plist
    Copy it to original location
    
    mv ~/Desktop/InstallHistory.plist /Library/Receipts/
  • 相关阅读:
    centos6.5升级gcc 4.4.7为最新版4.9.1
    vmware打开虚拟级断电情况下,无法找到虚拟机文件
    centos /usr/local 和/opt 安装软件你什么不同../configure --prefix=/usr...
    centos安装git
    P1207 双重回文数
    P1214 等差数列
    P1215 母亲的牛奶
    P1217 回文质数
    P3650 滑雪课程设计
    NOIP 2015[D2 T1] 跳石头
  • 原文地址:https://www.cnblogs.com/greywolf/p/3204584.html
Copyright © 2011-2022 走看看