Results 1 to 6 of 6

Thread: Setting java2metadata property in common.xml

  1. #1
    vincei's Avatar
    vincei is offline Registered User
    Name: Vincent Ibeachum
    Organization: Sherman Observatory
    Project: Remote Observatory Control
    Join Date
    Jul 2007
    Posts
    34

    Setting java2metadata property in common.xml

    Hi Guys,

    I've modified
    Ice-3.2.0\demoj\Ice\Invoke sample slightly by adding the following type:

    Code:
            dictionary<string, double> DoubleDict;
    	sequence<DoubleDict>	 DoubleDictSeq;
    I then used the supplied ANT build.xml to build the project. During the build I
    get the following error:

    Code:
    ... DoubleDictSeqHelper.java:39: generic array creation
    I've since discovered that, from the command line adding

    Code:
    slice2java --meta java:java2 ...
    Produces code that the compiler is happy with.

    My question is how or what do I have to do to the build.xml file to ensure that the java2metadata macro in common.xml gets set?

    Code:
    C:\Ice-3.2.0\demoj\Ice\Invoke>java -version
    java version "1.5.0_10"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode, sharing)

  2. #2
    vincei's Avatar
    vincei is offline Registered User
    Name: Vincent Ibeachum
    Organization: Sherman Observatory
    Project: Remote Observatory Control
    Join Date
    Jul 2007
    Posts
    34
    Thanks!

    -- Vince

  3. #3
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,441
    Hi Vince,

    I believe that the "generic array creation" issue was addressed in Ice 3.2.1. I'd encourage you to use this release instead of 3.2.0 if possible.

    Take care,
    Mark

  4. #4
    vincei's Avatar
    vincei is offline Registered User
    Name: Vincent Ibeachum
    Organization: Sherman Observatory
    Project: Remote Observatory Control
    Join Date
    Jul 2007
    Posts
    34
    Hi Mark,

    Once again thanks for the quick response. Moving to Ice-3.2.1 is definitely the
    right thing to do, however, that's turning out to be a hard sell for some reason.

    I'll work on getting the newer version deployed but in the meantime I'll have to
    workaround this problem by using make and not ant build scripts - I can't say I
    fully understand the reason for the existence of ant in the first place ... must
    be a Java thing

    I'll circle back on this.

    Take care,
    -- Vince

  5. #5
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,441
    Vince,

    If you always want to build using the Java2 mapping, you can edit config/build.properties and set

    jdk.version=1.4

    Of course this is only relevant for the Ice build system. If you are using the Slice2Java ant task in your own project, you can include a <meta> element like this:

    Code:
    <slice2java ...>
        <meta value="java:java2"/>
        ...
    </slice2java>
    Hope that helps,
    Mark

  6. #6
    vincei's Avatar
    vincei is offline Registered User
    Name: Vincent Ibeachum
    Organization: Sherman Observatory
    Project: Remote Observatory Control
    Join Date
    Jul 2007
    Posts
    34
    Hi Mark,

    Thanks! That worked great. Much appreciated.

    Cheers,
    -- Vince

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Common interface for objects and proxies
    By oag in forum Help Center
    Replies: 3
    Last Post: 05-11-2010, 09:13 PM
  2. Setting jvm parameters
    By aswani in forum Help Center
    Replies: 0
    Last Post: 08-20-2009, 02:03 PM
  3. Setting RetryIntervals below application level
    By ctennis in forum Help Center
    Replies: 4
    Last Post: 12-21-2006, 07:02 PM
  4. All client share common data?
    By eaglecn in forum Help Center
    Replies: 4
    Last Post: 04-26-2005, 10:39 PM
  5. common achitecture question
    By yomi in forum Help Center
    Replies: 1
    Last Post: 04-13-2004, 12:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •