BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

enum

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Compiler
View previous topic :: View next topic  
Author Message
cpanon
Guest





PostPosted: Sat Dec 24, 2005 8:05 pm    Post subject: enum Reply with quote



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





PostPosted: Wed Dec 28, 2005 6:39 pm    Post subject: Re: enum Reply with quote



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





PostPosted: Wed Dec 28, 2005 11:01 pm    Post subject: Re: enum Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Compiler All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.