Home Help Center

Java 7 support?

pchapinpchapin Vermont, USAMember Peter C. ChapinOrganization: Vermont Technical CollegeProject: Education
I'm attempting to install Ice 3.4.2 for Java on my Ubuntu 11.04 system. I am compiling from source. I'm also using Java 7, update 1. Compilation fails with the following:
ice-compile:
    [mkdir] Created dir: /usr/local/src/Ice-3.4.2/java/depcache
    [javac] Compiling 1228 source files to /usr/local/src/Ice-3.4.2/java/lib
    [javac] /usr/local/src/Ice-3.4.2/java/src/IceInternal/OutgoingConnectionFactory.java:20: error: name clash: put(K#1,V#1) in MultiHashMap and put(K#2,V#2) in HashMap have the same erasure, yet neither overrides the other
    [javac]         put(K key, V value)
    [javac]         ^
    [javac]   where K#1,V#1,K#2,V#2 are type-variables:
    [javac]     K#1 extends Object declared in class MultiHashMap
    [javac]     V#1 extends Object declared in class MultiHashMap
    [javac]     K#2 extends Object declared in class HashMap
    [javac]     V#2 extends Object declared in class HashMap
    [javac] 1 error
This smells like a Java 7 problem to me. I did successfully compile Ice 3.4.2 for Java on a different Ubuntu 10.10 system using Java 6. Can someone confirm that Java 7 is not supported by Ice for Java at this time? If that is the case, is there a time line for when it will be supported?

Thanks and keep up the good work. Ice is a great system.

Peter

Comments

  • leedm777leedm777 Member David M. LeeOrganization: DigiumProject: Asterisk SCF - open source communication framework
    I ran into the same issue, and wrote a patch for it.

    http://bit.ly/uO5KS3

    You can try it out and see if it works for you.

    --
    David M. Lee
    Digium, Inc. | Software Developer
    445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
    Check us out at: Phone Systems to Power Your Business - VoIP, PBX, IP PBX - Digium® The Asterisk Company & Asterisk- The Open Source Telephony Projects | Asterisk
  • pchapinpchapin Vermont, USAMember Peter C. ChapinOrganization: Vermont Technical CollegeProject: Education
    Yes, that patch did work for me. Thanks. I did run into a problem later when building the IceGrid administrative tool. Specifically Proguard v4.6 fails with the message
    /usr/local/src/Ice-3.4.2/java/build.xml:583: Can't read [/usr/local/src/Ice-3.4.2/java/lib/IceGridGUItemp.jar] (Can't process class [IceGridGUI/AdapterObserverI$1.class] (Unsupported version number [51.0] for class format))
    

    I guess a new version of Proguard is needed to process the Java 7 class files. I understand that this tool is not essential but it seems like more evidence that Ice isn't Java 7 ready quite yet.

    Peter
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Proguard 4.7 has support for Java 7, but we have not tested this yet.
  • pchapinpchapin Vermont, USAMember Peter C. ChapinOrganization: Vermont Technical CollegeProject: Education
    I just tried Proguard 4.7 beta3 and the build of everything was successful. I also tried 'ant test' and that was successful although I'm unclear on how much testing it did. I suppose I should try running the Ice Grid administrative GUI and see how that goes. I'll play with it some more but I seem to be up and running.

    Thanks!
Sign In or Register to comment.