Module: Language::Java
- Defined in:
- language/java.rb,
extend/os/mac/language/java.rb
Overview
Helper functions for Java formulae.
Class Method Summary collapse
- .java_home(version = nil) ⇒ Pathname? private
- .java_home_env(version = nil) ⇒ Hash private
- .overridable_java_home_env(version = nil) ⇒ Hash private
Class Method Details
.java_home(version = nil) ⇒ Pathname?
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
6 7 8 9 10 11 |
# File 'extend/os/mac/language/java.rb', line 6 def self.java_home(version = nil) openjdk = find_openjdk_formula(version) return unless openjdk openjdk.opt_libexec/"openjdk.jdk/Contents/Home" end |
.java_home_env(version = nil) ⇒ Hash
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
43 44 45 |
# File 'language/java.rb', line 43 def self.java_home_env(version = nil) { JAVA_HOME: java_home_shell(version) } end |
.overridable_java_home_env(version = nil) ⇒ Hash
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
48 49 50 |
# File 'language/java.rb', line 48 def self.overridable_java_home_env(version = nil) { JAVA_HOME: "${JAVA_HOME:-#{java_home_shell(version)}}" } end |