Use --jre-headless instead of --jre

In some cases it can cause problems and report these kind of errors:

$ update-java-alternatives -s /usr/lib/jvm/java-1.7.0-openjdk-amd64 --jre
update-alternatives: error: no alternatives for policytool
update-alternatives: error: no alternatives for policytool
This commit is contained in:
Richard Pijnenburg
2015-01-07 21:53:07 +00:00
parent 55ca769bc2
commit 3b290abddf
3 changed files with 20 additions and 1 deletions

View File

@@ -82,6 +82,11 @@ class java(
default => $java_alternative_path,
}
$jre_flag = $use_java_package_name ? {
/headless/ => '--jre-headless',
default => '--jre'
}
anchor { 'java::begin:': }
->
package { 'java':