🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.compiler
3 messages
3 total messages Started by cpanon Sat, 24 Dec 2005 20:05
enum
#242
Author: cpanon
Date: Sat, 24 Dec 2005 20:05
6 lines
1156 bytes
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.
Re: enum
#243
Author: Shankar Unni
Date: Wed, 28 Dec 2005 18:39
13 lines
1706 bytes
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.
Re: enum
#244
Author: Lori M Olson [TeamB]
Date: Wed, 28 Dec 2005 23:01
43 lines
2572 bytes
Shankar Unni wrote:
> 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads