We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › java enums in processing
Page Index Toggle Pages: 1
java enums in processing? (Read 711 times)
java enums in processing?
Dec 20th, 2006, 11:58am
 
Hey

i am new to processing and want to make a small program.
for this program to work nicely i wanted to use enums (as they are now available in java)

however, i can't declare them, anywhere. ive imported java.util.*, which it does fine, but as soon as i want to make an enum it gives errors. can anyone help here?

thanks in advance
Re: java enums in processing?
Reply #1 - Dec 20th, 2006, 12:03pm
 
I think enum is Java 1.5 only but processing is built on Java 1.4.
Re: java enums in processing?
Reply #2 - Dec 20th, 2006, 12:05pm
 
any way of using java 1.5 libraries or is that impossible?
Re: java enums in processing?
Reply #3 - Dec 20th, 2006, 1:28pm
 
I think that Processing doesn't like 1.5 libraries unfortunately.

I think it may be possible to swap the processing version of java with 1.5 but it may be tricky. It's probably much much much easier to just rework your program so it doesn't use enums.
Re: java enums in processing?
Reply #4 - Dec 20th, 2006, 1:48pm
 
you can use 1.5 libraries when you have java 1.5 installed, you cannot use 1.5 syntax (like enum, or HashMap<Integer>), unless you're building your code with eclipse or something like that, rather than the processing environment.
Page Index Toggle Pages: 1