ImageJ plugin for running compiled user plugins (.class files)

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

ImageJ plugin for running compiled user plugins (.class files)

Burger Wilhelm
Hello!

With the new Java 5 features being widely used, the obsolence of the SDK-supplied compiler (in tools.jar) has become a growing annoyance. I therefore always use an external Java compiler (such as Eclipse) to compile the plugin code into .class files, which I they then execute from ImageJ. Unfortunately, the current version of ImageJ asks for the compiler to be installed even for loading and exectuting .class files.
 
As a remedy, I wrote a simple plugin that lets you execute other plugins, similar to the "Compile-and-Run" command in ImageJ, but only works on compiled plugin (.class) files and thus does NOT require the Java compiler to be installed (usually found in tools.jar).

The Java source file can be found here:
http://webster.fh-hagenberg.at/staff/burger/imagej/index.html or
http://webster.fh-hagenberg.at/staff/burger/imagej/plugins/Plugin_Run_Only.java

Hope this is helpful, though I am sure Wayne already has a much more elegant solution for this.

Regards,
Wilhelm Burger
www.imagingbook.com
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ plugin for running compiled user plugins (.class files)

Wayne Rasband
With ImageJ 1.39f and later, the Compile and Run command will run a  
compiled plugin (.class file) without the Java compiler being present.

-wayne

On Oct 9, 2007, at 1:13 PM, Burger Wilhelm wrote:

> Hello!
>
> With the new Java 5 features being widely used, the obsolence of the  
> SDK-supplied compiler (in tools.jar) has become a growing annoyance. I  
> therefore always use an external Java compiler (such as Eclipse) to  
> compile the plugin code into .class files, which I they then execute  
> from ImageJ. Unfortunately, the current version of ImageJ asks for the  
> compiler to be installed even for loading and exectuting .class files.
>
> As a remedy, I wrote a simple plugin that lets you execute other  
> plugins, similar to the "Compile-and-Run" command in ImageJ, but only  
> works on compiled plugin (.class) files and thus does NOT require the  
> Java compiler to be installed (usually found in tools.jar).
>
> The Java source file can be found here:
> http://webster.fh-hagenberg.at/staff/burger/imagej/index.html or
> http://webster.fh-hagenberg.at/staff/burger/imagej/plugins/ 
> Plugin_Run_Only.java
>
> Hope this is helpful, though I am sure Wayne already has a much more  
> elegant solution for this.
>
> Regards,
> Wilhelm Burger
> www.imagingbook.com
>