Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
dushkin - 31 Jul 2007 08:41 GMT
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.
Roedy Green - 31 Jul 2007 12:42 GMT
>compile: org.apache.axis cannot be resolved to a type, Syntax error on
>token "enum", class expected
see http://mindprod.com/jgloss/compileerrormessages.html#CLASSEXPECTED
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Arne Vajhøj - 01 Aug 2007 00:06 GMT
>  Please review the following fragment:
>
[quoted text clipped - 9 lines]
> 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
Lew - 01 Aug 2007 17:34 GMT
>>  Please review the following fragment:
>>
[quoted text clipped - 17 lines]
> 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.

Signature

Lew

andy.sun@gmail.com - 01 Aug 2007 17:20 GMT
JDK 1.3 will be fine!
Lew - 01 Aug 2007 17:30 GMT
> 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.

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.