Login  Register

Re: Strange difference between Java 8 and 6 under OSX

Posted by Alexandre Dufour on Jul 18, 2015; 2:39pm
URL: http://imagej.273.s1.nabble.com/Strange-difference-between-Java-8-and-6-under-OSX-tp5013629p5013631.html

Hi Christophe,

I've had the same issue, only to realize that Java 8 has changed the way strings are parsed. This is a non backward compatible change, and is quite annoying indeed. Whichever code you use will first have to check the Java version before choosing which string to parse...

Alexandre

> On 18 juil. 2015, at 14:56, Christophe Leterrier <[hidden email]> wrote:
>
> Hi,
>
> I just noticed something strange. I'm running exactly the same Fiji setup
> on two Mac computers (it is mirrored between the two), but one uses Java 8
> and the other one Java 6 (latest versions, both under Yosemite).
>
> I have a javascript that contains a string split using the string "][".
>
> Under Java 8, I have to escape the characters like this to make it work:
> "\\]\\["
> Under Java 6, I have to modify my script and use "\]\["
>
> Is there some reason for this discrepancy? I'd like my script to be immune
> to which Java people use.
>
> Thanks for your help,
>
> Christophe
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html