Login  Register

Re: ImageJ Plugin

Posted by Hao An on Feb 06, 2007; 11:36pm
URL: http://imagej.273.s1.nabble.com/ImageJ-Plugin-tp3700388p3700394.html

So what do you get from your ImageJ, when you run macro
write(call("java.lang.System.getProperty",
"java.home"));

My installed imageJ1.37v (not ant-compiled one) show me:
C:\Program Files\ImageJ\jre

It is all jre. Why this one can have not problem for compile and run
plugins.

Thanks.

Hao



-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
Johannes Schindelin
Sent: Tuesday, February 06, 2007 5:27 PM
To: [hidden email]
Subject: Re: ImageJ Plugin

Hi,

On Tue, 6 Feb 2007, Hao An wrote:

> I do not have the line of "package plugins".

That is strange. Your mail said:

        java.lang.NoClassDefFoundError: My_Plugin(wrong
        name:plugins/My_Plugin

This suggests that somehow this plugin is compiled as if it were in the
package "plugins". With current ImageJ, it is not sufficient to put the
resulting class file in the directory "plugins". You _have_ to build a
jar
if your class is in some package.

Maybe your compile script does strange things?

> I wrote the macro(write(call("java.lang.System.getProperty",
> "java.home")), and I got this
>
> C:\Program Files\java\jdk1.5.0_04\jre
>
> That looks fine to me.

Not to me. The final "jre" says that it is a Java Runtime Environment
(JRE), as opposed to Java Development Kit (JDK).

Hth,
Dscho