Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

enum

0 views
Skip to first unread message

cpanon

unread,
Dec 24, 2005, 3:05:18 PM12/24/05
to
Hello
In JB05 SP4 where do I put in the -source 1.5 to allow compiling simple
enums in jdk1.4? I have 1.5 as a jdk, but I am tageting everything less
than 1.4 in Project|Properties and I still get this error message. I
have been over the faq and searched and cannot see where I can put in or
configure that option. tia.

Shankar Unni

unread,
Dec 28, 2005, 1:39:01 PM12/28/05
to
cpanon wrote:

I'm not sure you can do that.

You *could* set (in the Build/Java tab in the Project Properties) that
Language Features are set to v 5.0, but Target VM is v 1.4), but I'm not
sure whether that'll allow Enums to be compiled. Still, no harm in trying.

Lori M Olson [TeamB]

unread,
Dec 28, 2005, 6:01:01 PM12/28/05
to

I'm positive that you can't do it. Enums are one of those changes that
cause the class version to change. There are other 1.5 features (like
Autoboxing) that can be used in older JRE's because they only change the
source code syntax, not the generated bytecodes. But enums are new
bytecodes, so they won't be recognized in older JRE's

So basically, the only way to get enums to work is to have -source 1.5
and -target 1.5

--

Regards,

Lori Olson [TeamB]

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html

0 new messages