using jdk 1.5 shows error with enum

G

gayu

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

Hendrik Maryns

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

gayu schreef:
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.

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGg51be+7xMGD3itQRAp6WAJ9LDS9ihlNODJpdjJTZWH7kSh/LRQCfez70
oGIpBUYGfSr/FeKuzhymSfw=
=oQ9k
-----END PGP SIGNATURE-----
 
L

Lew

gayu schreef:
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.
 

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

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top