Home Help Center

slice2freezej problem

iwagneriwagner Member Isaac WagnerOrganization: RaytheonProject: Product Evaluation
I'm having an issue with silce2freezej...I just can't get it to work. I'm not sure what I'm doing wrong. Here's a simple slice file I created called test.ice:
module test {
    struct MyStruct {
        int num;
        string s;
    };
};

Then I try to generate the Java class:
slice2freezej --dict MyMap,string,test.MyStruct test.ice

I get the error "slice2freezej: error: `test.MyStruct' is not a valid type." What am I doing wrong?

Thanks,

Isaac

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Isaac,

    When referring to Slice types, you need to use the Slice syntax, not the Java syntax. Replace test.MyStruct with test::MyStruct and it should work.

    Regards,
    Mark
  • iwagneriwagner Member Isaac WagnerOrganization: RaytheonProject: Product Evaluation
    Ah, thanks. That works. FYI, section 39.6.3 in the manual is wrong then. I was following that example, which uses the Java notation.
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Thanks, I've fixed this in the 3.4.2 manual.

    Mark
Sign In or Register to comment.