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 versioning issue...
Page Index Toggle Pages: 1
Java versioning issue... (Read 650 times)
Java versioning issue...
Mar 26th, 2007, 8:06pm
 
I wasn't sure if I should post this as a bug or post it here...

I do Processing work on two separate machines--my laptop and PC.  While moving code from one to another, I was annoyed to find that the compiler on my PC had a hiccup when I used the contains function...as in String a.contains(String b).

It works fine on my laptop, so I never thought twice about it.

"Contains" is Java 1.5 (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html), but is not part of
Java 1.4.2 (http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html).

I'm assuming my laptop is using the JDK for 1.5 and my PC is using the JDK for 1.4.2.  I have both of them installed on both machines.  Is there a way to specify which JDK processing should use?  I'd prefer to stick to 1.4 for most stuff (and would've been happier if the laptop had caught the error as well), but I do need 1.5 for some non-Processing projects.

Windows XP / Processing 0124 on both machines.

Any thoughts?
Re: Java versioning issue...
Reply #1 - Mar 27th, 2007, 4:14am
 
it's just an annoyance that comes with the territory of dealing with java. i recommend sticking to 1.4 syntax as best you can to avoid the headaches (i.e. use the 1.4 javadoc as your reference).
Re: Java versioning issue...
Reply #2 - Mar 27th, 2007, 4:30am
 
That's kind of what I expected.  The sad thing is when I first typed it I had that tickle in the back of my mind saying ("Can I use that?")...but rather than look it up in the javadocs I usually subscribe to the "Press Play and see if it breaks" school of debugging.
Page Index Toggle Pages: 1