Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install Java 7 on Ubuntu with the opscode java community cookbook.

Java 6 seems to be the option no matter what incantation I make:

[2013-09-24T00:24:32+00:00] INFO: Processing package[openjdk-6-jdk] action install (java::openjdk line 49)

These are the relevant details of my wrapper:

cookbook "java", :git => ""

node.set["java"]["install_flavor"] = "openjdk"
node.set["java"]["jdk_version"] = "7"

include_recipe "java::default"

Any help would be appreciated.

share|improve this question

I couldn't find a way of doing this without putting an override in the role. I added this:

override_attributes \
  :java => {
        :jdk_version => "7"

I think the issue is that once the overrides are executed in the recipe it is too late.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.