Hide Forgot
ovirt-engine-sdk-java currently supports only OpenJDK 1.7 where it should support OpenJDK 1.6 as well as it's still widely used.
there are four options to tackle this: 1. with AspectJ, by modifying the byte code after compilation to have two targets 2. implementing AutoCloseable 3. fork downstream version 4. reverting AutoCloseable + jdk-7 targeting ============================================================= 1. too complex to code & maintain 2. a subject for the Oracle copyright violation 3. maintenance overhead 4. simple + safe i prefer #4 at downstream only, upstream version can be adapted by community to 1.6 if needed (up until now, no complaints been raised).
To verify that this actually works with Java 1.6 please do the following checks: 1. Check that the version number of the .class files contained in the package is 50.0 (which corresponds to Java 1.6): # cd /tmp # jar xvf /usr/share/java/rhevm-sdk-java/rhevm-sdk-java.jar # find . -name '*.class' -exec file {} \; The result should be something like this, for all the .class files: ./org/ovirt/engine/sdk/Api.class: compiled Java class data, version 50.0 (Java 1.6) 2. Make sure that you run the tests with Java 6.
ok, is31. # find . -name '*.class' -exec file {} \; | tail | head -n1 ./org/ovirt/engine/sdk/decorators/VMSnapshotDisk.class: compiled Java class data, version 50.0 (Java 1.6)
Closing - RHEV 3.3 Released