Login  Register

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

Posted by Wayne Rasband on Oct 09, 2007; 8:00pm
URL: http://imagej.273.s1.nabble.com/ImageJ-plugin-for-running-compiled-user-plugins-class-files-tp3698239p3698240.html

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
>