javascript does not run anymore in Fiji

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

javascript does not run anymore in Fiji

lechristophe
Hi,

Yesterday I discovered that my js scripts did not appear anymore in the
Plugins menu. Trying to run them directly using Plugins>Macro>Run, I got
the following error:

"JavaScript.jar was not found in the plugins folder or is outdated. Click
"OK" to download it from the ImageJ website"

This is with the latest (updated via updater) Fiji, IJ 2, Java 1.8.0_66
under OSX 10.11.2.

• I tried to use Java 1.6 but the current Fiji does not launch anymore with
Java 1.6 (the Apple one).

• I used a lifeline Fiji install (from Dec 22), and with this one scripts
do not work with Java 1.8 (I get the same error as above), but work fine if
I run Fiji with Java 1.6.

What is going on here? What is the plan for script support. I know Java 1.8
uses a different javascript engine than 1.6, but scripts used to work in
Fiji under 1.8 until quite recently. I rely extensively on scripts since I
was given the advice here some time ago that scripts were more future-proof
than IJ1 macros...

Thanks for your help,

Christophe

--
Christophe Leterrier
Researcher
Axonal Domains Architecture Team
CRN2M CNRS UMR 7286
Aix Marseille University, France

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: javascript does not run anymore in Fiji

Herbie
Dear Christophe,

who told you this:

"[...] since I was given the advice here some time ago that scripts were
more future-proof than IJ1 macros..."

Could you please refer to the post please.

Best

Herbie
------------------------------
PS:
Your post is a crosspost from the ImageJ-forum.

:::::::::::::::::::::::::::::::::::::::::::::::::
Am 13.01.16 um 13:55 schrieb Christophe Leterrier:

> Hi,
>
> Yesterday I discovered that my js scripts did not appear anymore in the
> Plugins menu. Trying to run them directly using Plugins>Macro>Run, I got
> the following error:
>
> "JavaScript.jar was not found in the plugins folder or is outdated. Click
> "OK" to download it from the ImageJ website"
>
> This is with the latest (updated via updater) Fiji, IJ 2, Java 1.8.0_66
> under OSX 10.11.2.
>
> • I tried to use Java 1.6 but the current Fiji does not launch anymore with
> Java 1.6 (the Apple one).
>
> • I used a lifeline Fiji install (from Dec 22), and with this one scripts
> do not work with Java 1.8 (I get the same error as above), but work fine if
> I run Fiji with Java 1.6.
>
> What is going on here? What is the plan for script support. I know Java 1.8
> uses a different javascript engine than 1.6, but scripts used to work in
> Fiji under 1.8 until quite recently. I rely extensively on scripts since I
> was given the advice here some time ago that scripts were more future-proof
> than IJ1 macros...
>
> Thanks for your help,
>
> Christophe
>
> --
> Christophe Leterrier
> Researcher
> Axonal Domains Architecture Team
> CRN2M CNRS UMR 7286
> Aix Marseille University, France
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: javascript does not run anymore in Fiji

ctrueden
In reply to this post by lechristophe
Hi Christophe,

I will reply to your corresponding thread on the forum:
    http://forum.imagej.net/t/x/620

Regards,
Curtis


On Wed, Jan 13, 2016 at 1:55 PM, Christophe Leterrier <
[hidden email]> wrote:

> Hi,
>
> Yesterday I discovered that my js scripts did not appear anymore in the
> Plugins menu. Trying to run them directly using Plugins>Macro>Run, I got
> the following error:
>
> "JavaScript.jar was not found in the plugins folder or is outdated. Click
> "OK" to download it from the ImageJ website"
>
> This is with the latest (updated via updater) Fiji, IJ 2, Java 1.8.0_66
> under OSX 10.11.2.
>
> • I tried to use Java 1.6 but the current Fiji does not launch anymore with
> Java 1.6 (the Apple one).
>
> • I used a lifeline Fiji install (from Dec 22), and with this one scripts
> do not work with Java 1.8 (I get the same error as above), but work fine if
> I run Fiji with Java 1.6.
>
> What is going on here? What is the plan for script support. I know Java 1.8
> uses a different javascript engine than 1.6, but scripts used to work in
> Fiji under 1.8 until quite recently. I rely extensively on scripts since I
> was given the advice here some time ago that scripts were more future-proof
> than IJ1 macros...
>
> Thanks for your help,
>
> Christophe
>
> --
> Christophe Leterrier
> Researcher
> Axonal Domains Architecture Team
> CRN2M CNRS UMR 7286
> Aix Marseille University, France
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: javascript does not run anymore in Fiji

lechristophe
Thanks Curtis!

Regarding Herbie's question (who advised my to use JS), it was Wayne and
Albert Cardona back in 2011 that convinced me to switch from macro to js:
http://imagej.1557.x6.nabble.com/Bug-in-newArray-macro-function-was-quot-Re-Strange-variable-type-for-arrays-filled-from-a-dialog-in--td3682847.html#a3682853

Sorry to have crossposted but I had the impression on talking alone in the
forum...

Best,

Christophe

On Wed, Jan 13, 2016 at 3:36 PM, Curtis Rueden <[hidden email]> wrote:

> Hi Christophe,
>
> I will reply to your corresponding thread on the forum:
>     http://forum.imagej.net/t/x/620
>
> Regards,
> Curtis
>
>
> On Wed, Jan 13, 2016 at 1:55 PM, Christophe Leterrier <
> [hidden email]> wrote:
>
> > Hi,
> >
> > Yesterday I discovered that my js scripts did not appear anymore in the
> > Plugins menu. Trying to run them directly using Plugins>Macro>Run, I got
> > the following error:
> >
> > "JavaScript.jar was not found in the plugins folder or is outdated. Click
> > "OK" to download it from the ImageJ website"
> >
> > This is with the latest (updated via updater) Fiji, IJ 2, Java 1.8.0_66
> > under OSX 10.11.2.
> >
> > • I tried to use Java 1.6 but the current Fiji does not launch anymore
> with
> > Java 1.6 (the Apple one).
> >
> > • I used a lifeline Fiji install (from Dec 22), and with this one scripts
> > do not work with Java 1.8 (I get the same error as above), but work fine
> if
> > I run Fiji with Java 1.6.
> >
> > What is going on here? What is the plan for script support. I know Java
> 1.8
> > uses a different javascript engine than 1.6, but scripts used to work in
> > Fiji under 1.8 until quite recently. I rely extensively on scripts since
> I
> > was given the advice here some time ago that scripts were more
> future-proof
> > than IJ1 macros...
> >
> > Thanks for your help,
> >
> > Christophe
> >
> > --
> > Christophe Leterrier
> > Researcher
> > Axonal Domains Architecture Team
> > CRN2M CNRS UMR 7286
> > Aix Marseille University, France
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: javascript does not run anymore in Fiji

Albert Cardona-2
Herbie,

In my experience, javascript scripts continue working where macros tend to
break--even if Wayne swiftly and amazingly addresses issues as quickly as
they are reported. Javascript is a solid, powerful language that doesn't
get new features added continuously that introduce subtle unintended
consequences.

Albert

2016-01-13 9:51 GMT-05:00 Christophe Leterrier <
[hidden email]>:

> Thanks Curtis!
>
> Regarding Herbie's question (who advised my to use JS), it was Wayne and
> Albert Cardona back in 2011 that convinced me to switch from macro to js:
>
> http://imagej.1557.x6.nabble.com/Bug-in-newArray-macro-function-was-quot-Re-Strange-variable-type-for-arrays-filled-from-a-dialog-in--td3682847.html#a3682853
>
> Sorry to have crossposted but I had the impression on talking alone in the
> forum...
>
> Best,
>
> Christophe
>
> On Wed, Jan 13, 2016 at 3:36 PM, Curtis Rueden <[hidden email]> wrote:
>
> > Hi Christophe,
> >
> > I will reply to your corresponding thread on the forum:
> >     http://forum.imagej.net/t/x/620
> >
> > Regards,
> > Curtis
> >
> >
> > On Wed, Jan 13, 2016 at 1:55 PM, Christophe Leterrier <
> > [hidden email]> wrote:
> >
> > > Hi,
> > >
> > > Yesterday I discovered that my js scripts did not appear anymore in the
> > > Plugins menu. Trying to run them directly using Plugins>Macro>Run, I
> got
> > > the following error:
> > >
> > > "JavaScript.jar was not found in the plugins folder or is outdated.
> Click
> > > "OK" to download it from the ImageJ website"
> > >
> > > This is with the latest (updated via updater) Fiji, IJ 2, Java 1.8.0_66
> > > under OSX 10.11.2.
> > >
> > > • I tried to use Java 1.6 but the current Fiji does not launch anymore
> > with
> > > Java 1.6 (the Apple one).
> > >
> > > • I used a lifeline Fiji install (from Dec 22), and with this one
> scripts
> > > do not work with Java 1.8 (I get the same error as above), but work
> fine
> > if
> > > I run Fiji with Java 1.6.
> > >
> > > What is going on here? What is the plan for script support. I know Java
> > 1.8
> > > uses a different javascript engine than 1.6, but scripts used to work
> in
> > > Fiji under 1.8 until quite recently. I rely extensively on scripts
> since
> > I
> > > was given the advice here some time ago that scripts were more
> > future-proof
> > > than IJ1 macros...
> > >
> > > Thanks for your help,
> > >
> > > Christophe
> > >
> > > --
> > > Christophe Leterrier
> > > Researcher
> > > Axonal Domains Architecture Team
> > > CRN2M CNRS UMR 7286
> > > Aix Marseille University, France
> > >
> > > --
> > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> > >
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
http://albert.rierol.net
http://www.janelia.org/lab/cardona-lab
http://www.ini.uzh.ch/~acardona/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: javascript does not run anymore in Fiji

Herbie
Albert,

thanks for chiming in!

"[...] javascript scripts continue working where macros tend to break [...]"

That's interesting or should I say I may simply be lucky:
I have very many, partially very complex IJ-macros that are many years
old but I never encountered that one of them broke under a current
version of IJ-1.

For me javascript is a terrible language and instead of using it I
should prefer Java. For rapid prototyping the IJ-macro language is ideal
for me and I can't complain about it.

Best

Herbie

::::::::::::::::::::::::::::::::::::::::::::
Am 13.01.16 um 16:11 schrieb Albert Cardona:

> Herbie,
>
> In my experience, javascript scripts continue working where macros tend to
> break--even if Wayne swiftly and amazingly addresses issues as quickly as
> they are reported. Javascript is a solid, powerful language that doesn't
> get new features added continuously that introduce subtle unintended
> consequences.
>
> Albert
>
> 2016-01-13 9:51 GMT-05:00 Christophe Leterrier <
> [hidden email]>:
>
>> Thanks Curtis!
>>
>> Regarding Herbie's question (who advised my to use JS), it was Wayne and
>> Albert Cardona back in 2011 that convinced me to switch from macro to js:
>>
>> http://imagej.1557.x6.nabble.com/Bug-in-newArray-macro-function-was-quot-Re-Strange-variable-type-for-arrays-filled-from-a-dialog-in--td3682847.html#a3682853
>>
>> Sorry to have crossposted but I had the impression on talking alone in the
>> forum...
>>
>> Best,
>>
>> Christophe
>>
>> On Wed, Jan 13, 2016 at 3:36 PM, Curtis Rueden <[hidden email]> wrote:
>>
>>> Hi Christophe,
>>>
>>> I will reply to your corresponding thread on the forum:
>>>      http://forum.imagej.net/t/x/620
>>>
>>> Regards,
>>> Curtis
>>>
>>>
>>> On Wed, Jan 13, 2016 at 1:55 PM, Christophe Leterrier <
>>> [hidden email]> wrote:
>>>
>>>> Hi,
>>>>
>>>> Yesterday I discovered that my js scripts did not appear anymore in the
>>>> Plugins menu. Trying to run them directly using Plugins>Macro>Run, I
>> got
>>>> the following error:
>>>>
>>>> "JavaScript.jar was not found in the plugins folder or is outdated.
>> Click
>>>> "OK" to download it from the ImageJ website"
>>>>
>>>> This is with the latest (updated via updater) Fiji, IJ 2, Java 1.8.0_66
>>>> under OSX 10.11.2.
>>>>
>>>> • I tried to use Java 1.6 but the current Fiji does not launch anymore
>>> with
>>>> Java 1.6 (the Apple one).
>>>>
>>>> • I used a lifeline Fiji install (from Dec 22), and with this one
>> scripts
>>>> do not work with Java 1.8 (I get the same error as above), but work
>> fine
>>> if
>>>> I run Fiji with Java 1.6.
>>>>
>>>> What is going on here? What is the plan for script support. I know Java
>>> 1.8
>>>> uses a different javascript engine than 1.6, but scripts used to work
>> in
>>>> Fiji under 1.8 until quite recently. I rely extensively on scripts
>> since
>>> I
>>>> was given the advice here some time ago that scripts were more
>>> future-proof
>>>> than IJ1 macros...
>>>>
>>>> Thanks for your help,
>>>>
>>>> Christophe
>>>>
>>>> --
>>>> Christophe Leterrier
>>>> Researcher
>>>> Axonal Domains Architecture Team
>>>> CRN2M CNRS UMR 7286
>>>> Aix Marseille University, France
>>>>
>>>> --
>>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>>
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
>
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: javascript does not run anymore in Fiji

Dimiter Prodanov (imec)
In reply to this post by lechristophe
Dear All,

I don't know the specifics of the problem here, so excuse me for bringing a different perspective.

For simple automation tasks, I recommend using macros with IJ1. Javascript is a functional programming language so unless you need to rewrite dynamically expressions and evaluate  there is no need to use it.
As a rule of thumb, if you have more than 2 for loops I recommend writing a plugin which will allow you to use the full power of the Java language.
In case you need more extensive calculations for development I recommend a combination of Matlab and IJ.

Best regards,

Dimiter
 

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