Bug 1043465

Summary: [RHEVM-SDK-JAVA] support OpenJDK1.6
Product: Red Hat Enterprise Virtualization Manager Reporter: Arthur Berezin <aberezin>
Component: ovirt-engine-sdk-javaAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: unspecified Docs Contact:
Priority: high    
Version: 3.3.0CC: bazulay, nbarcet, pstehlik, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 3.3.0Flags: aberezin: Triaged+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: rhevm-sdk-java-1.0.0.29-0.1.el6ev Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Arthur Berezin 2013-12-16 11:48:08 UTC
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.

Comment 1 Michael Pasternak 2013-12-16 12:08:11 UTC
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).

Comment 4 Juan Hernández 2013-12-17 10:09:08 UTC
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.

Comment 5 Jiri Belka 2014-01-13 11:39:55 UTC
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)

Comment 6 Itamar Heim 2014-01-21 22:24:38 UTC
Closing - RHEV 3.3 Released

Comment 7 Itamar Heim 2014-01-21 22:25:29 UTC
Closing - RHEV 3.3 Released

Comment 8 Itamar Heim 2014-01-21 22:29:00 UTC
Closing - RHEV 3.3 Released