Module: Language::Java

Defined in:
language/java.rb,
extend/os/mac/language/java.rb

Overview

Helper functions for Java formulae.

Class Method Summary collapse

Class Method Details

.java_home(version = nil) ⇒ Object



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) ⇒ Object



39
40
41
# File 'language/java.rb', line 39

def self.java_home_env(version = nil)
  { JAVA_HOME: java_home_shell(version) }
end

.overridable_java_home_env(version = nil) ⇒ Object



43
44
45
# File 'language/java.rb', line 43

def self.overridable_java_home_env(version = nil)
  { JAVA_HOME: "${JAVA_HOME:-#{java_home_shell(version)}}" }
end