This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes as of release 5, 'enum' is a keyword... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "as of release 5, Watch "as of release 5, New topic
Author

as of release 5, 'enum' is a keyword...

L Willie
Ranch Hand

Joined: Aug 10, 2008
Posts: 51
following is an open source project that can make keytool in GUI looks and use

i try to understand and use it,however it display such error message during compile 1 of the file
as of release 5, 'enum' is a keyword, and may not be used as an identifier

following it he code


how to solve this problem?, thank
Sincerely

willie
Pavan Kumar Srinivasan
Greenhorn

Joined: Sep 17, 2008
Posts: 27
use '-source 1.4 ' to use enum as an identifier when compiling with javac.
[ October 15, 2008: Message edited by: Pavan Kumar Srinivasan ]
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10175
    
    8

"L.Willie"
Could you please adjust your screen display name to comply to the ranch naming policy?

Coming back to your problem:
Take a look at this article. It lists the reserved keywords in java. As you can see "enum" is one of them.
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html

To fix your problem, you need to change to something like

This doesn't look like an advanced question. Can any of the mods. please move this to a more appropriate forum?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
L Willie
Ranch Hand

Joined: Aug 10, 2008
Posts: 51
thank,understand now
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10175
    
    8

Originally posted by L Willie:
thank,understand now


You are welcome.

Did you also read this?
"L.Willie"
Could you please adjust your screen display name to comply to the ranch naming policy?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: as of release 5, 'enum' is a keyword...
 
Similar Threads
java.net.UnknownHostException in SSL
Help with OCSP Stand Alone Implementation
Help with conversion of String to x509Certificate
Getting services to work with NTLM Authentication over HTTPS/SSL
using bouncy castle jce provider??