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

D

dushkin

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.
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

dushkin said:
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
 
L

Lew

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.
 
L

Lew

Arne said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top