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 / June 2007

Tip: Looking for answers? Try searching our database.

using jdk 1.5 shows error with enum

Thread view: 
gayu - 28 Jun 2007 12:26 GMT
hi,

i am working on netbeans on webservices.

i have j.d.k 1.5 being used  in my program which gives error as

"(try -source 1.4 or lower to use 'enum' as an identifier)
       oper.setUse(org.apache.axis.enum.Use.ENCODED);"

the code  that i used is

"oper.setStyle(org.apache.axis.enum.Style.RPC);
       oper.setUse(org.apache.axis.enum.Use.ENCODED);"

please give me a solution at the earliest.
Hendrik Maryns - 28 Jun 2007 12:35 GMT
gayu schreef:
> hi,
>
[quoted text clipped - 11 lines]
>
> please give me a solution at the earliest.

You have a package that has ‘enum’ in its name.  This is no longer
allowed in Java 1.5.  Rename the package or do what the compiler says:
compile with -source 1.4 (I would recommend the former).

H.
- --
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
Lew - 29 Jun 2007 07:24 GMT
gayu schreef:
>> i have j.d.k 1.5 being used  in my program which gives error as
>>
[quoted text clipped - 5 lines]
>> "oper.setStyle(org.apache.axis.enum.Style.RPC);
>>         oper.setUse(org.apache.axis.enum.Use.ENCODED);"

>> please give me a solution at the earliest.
>
> You have a package that has ‘enum’ in its name.  This is no longer
> allowed in Java 1.5.  Rename the package or do what the compiler says:
> compile with -source 1.4 (I would recommend the former).

You are stuck with the latter since you don't get to rename the third-party
artifacts.

You could try the version of Axis that doesn't have this issue.
<http://ws.apache.org/axis2/>

Even in Asix 1.x the particular class 'Use' is deprecated.
<http://ws.apache.org/axis/java/apiDocs/org/apache/axis/enum/package-summary.html>

Bottom line: don't use that 'org.apache.axis.enum' package.

Signature

Lew

Roedy Green - 28 Jun 2007 15:03 GMT
>i have j.d.k 1.5 being used  in my program which gives error as
>
>"(try -source 1.4 or lower to use 'enum' as an identifier)
>        oper.setUse(org.apache.axis.enum.Use.ENCODED);"

see
http://mindprod.com/jgloss/compileerrormessages.html#ENUMASIDENTIFIER
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com


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



©2009 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.