From 5f89c0a9423be29ee6e82782ef71a3b2aea6832b Mon Sep 17 00:00:00 2001 From: commitay Date: Sun, 28 May 2017 14:15:44 +1000 Subject: [PATCH] Remove java7 (#3914) --- Casks/java7.rb | 73 -------------------------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 Casks/java7.rb diff --git a/Casks/java7.rb b/Casks/java7.rb deleted file mode 100644 index 879ac7831..000000000 --- a/Casks/java7.rb +++ /dev/null @@ -1,73 +0,0 @@ -cask 'java7' do - version '1.7.0_80' - sha256 '2b9deef240a7f07d08541da01bbd60cbf93bf713efd5997e586ba23ec4f5089e' - - url 'http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-macosx-x64.dmg', - cookies: { - 'oraclelicense' => 'accept-securebackup-cookie', - } - name 'Java Standard Edition Development Kit' - homepage 'http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html' - - pkg 'JDK 7 Update 80.pkg' - - postflight do - system_command '/usr/libexec/PlistBuddy', - args: ['-c', 'Add :JavaVM:JVMCapabilities: string BundledApp', "/Library/Java/JavaVirtualMachines/jdk#{version}.jdk/Contents/Info.plist"], - sudo: true - system_command '/usr/libexec/PlistBuddy', - args: ['-c', 'Add :JavaVM:JVMCapabilities: string JNI', "/Library/Java/JavaVirtualMachines/jdk#{version}.jdk/Contents/Info.plist"], - sudo: true - system_command '/usr/libexec/PlistBuddy', - args: ['-c', 'Add :JavaVM:JVMCapabilities: string WebStart', "/Library/Java/JavaVirtualMachines/jdk#{version}.jdk/Contents/Info.plist"], - sudo: true - system_command '/usr/libexec/PlistBuddy', - args: ['-c', 'Add :JavaVM:JVMCapabilities: string Applets', "/Library/Java/JavaVirtualMachines/jdk#{version}.jdk/Contents/Info.plist"], - sudo: true - system_command '/bin/mkdir', - args: ['-p', '--', "/Library/Java/JavaVirtualMachines/jdk#{version}.jdk/Contents/Home/bundle/Libraries"], - sudo: true - system_command '/bin/ln', - args: ['-nsf', '--', "/Library/Java/JavaVirtualMachines/jdk#{version}.jdk/Contents/Home/jre/lib/server/libjvm.dylib", "/Library/Java/JavaVirtualMachines/jdk#{version}.jdk/Contents/Home/bundle/Libraries/libserver.dylib"], - sudo: true - - if MacOS.version <= :mavericks - system_command '/bin/rm', - args: ['-rf', '--', '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK'], - sudo: true - system_command '/bin/ln', - args: ['-nsf', '--', "/Library/Java/JavaVirtualMachines/jdk#{version}.jdk/Contents", '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK'], - sudo: true - end - end - - uninstall pkgutil: 'com.oracle.jdk7u80', - delete: [ - MacOS.version <= :mavericks ? '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK' : '', - ].keep_if { |v| !v.empty? } - - zap delete: [ - '~/Library/Application Support/Oracle/Java', - '~/Library/Caches/com.oracle.java.Java-Updater', - '~/Library/Caches/net.java.openjdk.cmd', - ], - rmdir: '~/Library/Application Support/Oracle/' - - caveats <<-EOS.undent - This Cask makes minor modifications to the JRE to prevent any packaged - application issues. - - If your Java application still asks for JRE installation, you might need to - reboot or logout/login. - - The JRE packaging bug is discussed here: - - https://bugs.eclipse.org/bugs/show_bug.cgi?id=411361 - - Installing this Cask means you have AGREED to the Oracle Binary Code License - Agreement for Java SE at - - http://www.oracle.com/technetwork/java/javase/terms/license/index.html - - EOS -end