Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.48 KB

alternatives.md

File metadata and controls

35 lines (25 loc) · 1.48 KB

java_alternatives

back to resource list

The java_alternatives resource uses update-alternatives command to set and unset command alternatives for various Java tools such as java, javac, etc.

Actions

  • :set: set alternatives for Java tools
  • :unset: unset alternatives for Java tools

Properties

Name Type Default Description
java_location String Java installation location
bin_cmds String Array of Java tool names to set or unset alternatives on
default true, false true Whether to set the Java tools as system default. Boolean, defaults to true
priority Integer 1061 Priority of the alternatives. Integer, defaults to 1061
reset_alternatives true, false true Whether to reset alternatives before setting them
  • java_location: Java installation location.
  • bin_cmds: .
  • default: .
  • priority: .

Examples

java_alternatives "set java alternatives" do
    java_location '/usr/local/java'
    bin_cmds ["java", "javac"]
end