tylerwalts / puppet-jdk_oracle

Puppet module to install JDK from oracle using wget
Other
15 stars 54 forks source link

make sure to configure the specified java to be the "best" version #55

Closed fraenki closed 9 years ago

fraenki commented 9 years ago

On Ubuntu 14.04 I've updated from Oracle JDK 1.8.0_51-b16 to JDK 1.8.0_60-b27. I had $default_java=true set and thus was expecting the module would change the default Java to the new version.

Apparently the module installed the new Java, but it failed to configure update-alternatives accordingly:

# update-alternatives --display java
java - manual mode
  link currently points to /data/jdk1.8.0_51/bin/java
/data/jdk1.8.0_51/bin/java - priority 20000
/data/jdk1.8.0_60/bin/java - priority 20000
Current 'best' version is '/data/jdk1.8.0_51/bin/java'.

As you can see, the "best" (and therefore symlinked) version is still 1.8.0_51-b16.

This PR addresses this and executes a updates-alternatives --set to actually activate the specified version.

fraenki commented 9 years ago

Additionally I've added a commit to make the jstack binary available to the system via alternatives.

tylerwalts commented 9 years ago

Thanks!