0 Replies Latest reply: Aug 19, 2010 6:18 AM by 843793 RSS

    IDL to JAVA - problem with enum, const assignment

    843793
      Hi,
      I have a problem with compile IDL to JAVA.

      I want to compile foo.idl to java by command:
       idlj foo.idl 
      foo.idl:
          enum color {
            blue,
            red,
            green,
            yelow
          };
      
          const color DEFAULT_COLOR = blue;
      But I get errors:
      foo.idl (line 8):  The type of  is enumeration, but it should be primitive or string.
       const color DEFAULT_COLOR = blue;
      
      foo.idl (line 8):  Identifiers in constant expressions must be constants, not blue.
       const color DEFAULT_COLOR = blue;
      I don't think that IDL file (foo.idl) is wrong, because I compile this file to c and python without errors.

      Can you help me?