diff --git a/Casks/java8.rb b/Casks/java8.rb index ca69df120..5bf680f1f 100644 --- a/Casks/java8.rb +++ b/Casks/java8.rb @@ -34,15 +34,6 @@ cask 'java8' do system_command '/bin/ln', args: ['-nsf', '--', "/Library/Java/JavaVirtualMachines/jdk#{version.split('-')[0]}.jdk/Contents/Home/jre/lib/server/libjvm.dylib", "/Library/Java/JavaVirtualMachines/jdk#{version.split('-')[0]}.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.split('-')[0]}.jdk/Contents", '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK'], - sudo: true - end end uninstall pkgutil: [ @@ -62,13 +53,7 @@ cask 'java8' do "/Library/Java/JavaVirtualMachines/jdk#{version.split('-')[0]}.jdk/Contents", '/Library/PreferencePanes/JavaControlPanel.prefPane', '/Library/Java/Home', - if MacOS.version <= :mavericks - [ - '/usr/lib/java/libjdns_sd.jnilib', - '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK', - ] - end, - ].keep_if { |v| !v.nil? } + ] zap trash: [ '~/Library/Application Support/Java/', diff --git a/Casks/zulu7.rb b/Casks/zulu7.rb index fcd20c2cb..727fae187 100644 --- a/Casks/zulu7.rb +++ b/Casks/zulu7.rb @@ -22,28 +22,12 @@ cask 'zulu7' do system_command '/usr/libexec/PlistBuddy', args: ['-c', 'Add :JavaVM:JVMCapabilities: string JNI', "/Library/Java/JavaVirtualMachines/zulu#{version.before_comma}.jdk/Contents/Info.plist"], 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/zulu#{version.before_comma}.jdk/Contents", '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK'], - sudo: true - end end - uninstall pkgutil: [ - "com.azulsystems.zulu.#{version.minor}", - ], + uninstall pkgutil: "com.azulsystems.zulu.#{version.minor}", delete: [ "/Library/Java/JavaVirtualMachines/zulu#{version.before_comma}.jdk", "/Library/Java/JavaVirtualMachines/zulu-#{version.minor}.jdk", '/Library/Java/Home', - if MacOS.version <= :mavericks - [ - '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK', - ] - end, - ].keep_if { |v| !v.nil? } + ] end diff --git a/Casks/zulu8.rb b/Casks/zulu8.rb index cacdf1d54..be914d397 100644 --- a/Casks/zulu8.rb +++ b/Casks/zulu8.rb @@ -22,28 +22,12 @@ cask 'zulu8' do system_command '/usr/libexec/PlistBuddy', args: ['-c', 'Add :JavaVM:JVMCapabilities: string JNI', "/Library/Java/JavaVirtualMachines/zulu#{version.before_comma}.jdk/Contents/Info.plist"], 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/zulu#{version.before_comma}.jdk/Contents", '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK'], - sudo: true - end end - uninstall pkgutil: [ - "com.azulsystems.zulu.#{version.minor}", - ], + uninstall pkgutil: "com.azulsystems.zulu.#{version.minor}", delete: [ "/Library/Java/JavaVirtualMachines/zulu#{version.before_comma}.jdk", "/Library/Java/JavaVirtualMachines/zulu-#{version.minor}.jdk", '/Library/Java/Home', - if MacOS.version <= :mavericks - [ - '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK', - ] - end, - ].keep_if { |v| !v.nil? } + ] end