org.apache.axis cannot be resolved to a type, Syntax error on token "enum", class expected

Discussion in 'Java' started by dushkin, Jul 31, 2007.

  1. dushkin

    dushkin Guest

    Hello.

    Please review the following fragment:

    org.apache.axis.description.OperationDesc oper;
    oper = new org.apache.axis.description.OperationDesc();
    oper.setStyle(org.apache.axis.enum.Style.RPC); // fails to
    compile: org.apache.axis cannot be resolved to a type, Syntax error on
    token "enum", class expected

    //oper.setStyle(org.apache.axis.constants.Style.RPC);//
    compiles!


    I work with eclipse and use JDK 1.4.10. No other jdk is installed on
    my pc!!!

    Any ideas? Thanks.
     
    dushkin, Jul 31, 2007
    #1
    1. Advertising

  2. dushkin

    Roedy Green Guest

    Roedy Green, Jul 31, 2007
    #2
    1. Advertising

  3. Re: org.apache.axis cannot be resolved to a type, Syntax error ontoken "enum", class expected

    dushkin wrote:
    > Please review the following fragment:
    >
    > org.apache.axis.description.OperationDesc oper;
    > oper = new org.apache.axis.description.OperationDesc();
    > oper.setStyle(org.apache.axis.enum.Style.RPC); // fails to
    > compile: org.apache.axis cannot be resolved to a type, Syntax error on
    > token "enum", class expected
    >
    > //oper.setStyle(org.apache.axis.constants.Style.RPC);//
    > compiles!
    >
    >
    > I work with eclipse and use JDK 1.4.10. No other jdk is installed on
    > my pc!!!


    The reason for the error is that enum is a keyword in newer Java
    versions.

    Newer is 1.5+, so your 1.4 (1.4.2_10 ????) should be fine.

    But Eclipse comes with its own compiler. My guess is that
    it compiles with 1.5 syntax !

    Arne
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Aug 1, 2007
    #3
  4. dushkin

    Guest

    JDK 1.3 will be fine!
     
    , Aug 1, 2007
    #4
  5. dushkin

    Lew Guest

    Re: org.apache.axis cannot be resolved to a type, Syntax error ontoken "enum", class expected

    wrote:
    > JDK 1.3 will be fine!


    For what? Making sure their code is obsolete before they start? The OP
    stated that they've already got 1.4, which had significant improvements over
    the obsolete 1.3; there is no benefit to regressing.

    --
    Lew
     
    Lew, Aug 1, 2007
    #5
  6. dushkin

    Lew Guest

    Re: org.apache.axis cannot be resolved to a type, Syntax error ontoken "enum", class expected

    Arne Vajhøj wrote:
    > dushkin wrote:
    >> Please review the following fragment:
    >>
    >> org.apache.axis.description.OperationDesc oper;
    >> oper = new org.apache.axis.description.OperationDesc();
    >> oper.setStyle(org.apache.axis.enum.Style.RPC); // fails to
    >> compile: org.apache.axis cannot be resolved to a type, Syntax error on
    >> token "enum", class expected
    >>
    >> //oper.setStyle(org.apache.axis.constants.Style.RPC);//
    >> compiles!
    >>
    >>
    >> I work with eclipse and use JDK 1.4.10. No other jdk is installed on
    >> my pc!!!

    >
    > The reason for the error is that enum is a keyword in newer Java
    > versions.
    >
    > Newer is 1.5+, so your 1.4 (1.4.2_10 ????) should be fine.
    >
    > But Eclipse comes with its own compiler. My guess is that
    > it compiles with 1.5 syntax !


    With Java 5 and later, including if it's built in to the IDE, set -source 1.4.
    Also, seriously investigate Roedy's suggestion.

    --
    Lew
     
    Lew, Aug 1, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joey Vendetta
    Replies:
    0
    Views:
    3,515
    Joey Vendetta
    Apr 1, 2004
  2. Replies:
    0
    Views:
    1,000
  3. bossanovaplayer
    Replies:
    4
    Views:
    12,788
    bossanovaplayer
    Jun 17, 2005
  4. John Smith
    Replies:
    1
    Views:
    15,566
    Oliver Wong
    May 31, 2006
  5. =?Utf-8?B?Y2FzaGRlc2ttYWM=?=

    This is an unexpected token. The expected token is 'NAME'

    =?Utf-8?B?Y2FzaGRlc2ttYWM=?=, Jul 13, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    828
    =?Utf-8?B?Y2FzaGRlc2ttYWM=?=
    Jul 13, 2007
Loading...

Share This Page