 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
cpanon Guest
|
Posted: Sat Dec 24, 2005 8:05 pm Post subject: enum |
|
|
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.
|
|
| Back to top |
|
 |
Shankar Unni Guest
|
Posted: Wed Dec 28, 2005 6:39 pm Post subject: Re: enum |
|
|
cpanon wrote:
| Quote: | 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.
|
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.
|
|
| Back to top |
|
 |
Lori M Olson [TeamB] Guest
|
Posted: Wed Dec 28, 2005 11:01 pm Post subject: Re: enum |
|
|
Shankar Unni wrote:
| Quote: | cpanon wrote:
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.
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.
|
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
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|