Login  Register

Re: compiling java 1.5 code

Posted by Albert Cardona on Apr 17, 2007; 1:09am
URL: http://imagej.273.s1.nabble.com/compiling-java-1-5-code-tp3699740p3699741.html

Hi Adrian,

There are several ways to go about it. Here is one:

1) Create your own compiler plugin. You can model it after
ij.plugin.Compiler
2) Edit your IJ_Prefs.txt so that plugin06 (Compile and Run...) will
point to your own plugin and not to the default
ij.plugin.Hotkeys("Compile and Run...").


Here's another:

1) Create your own compiler plugin
2) Create a macro that calls (using macro function call(...); ) a static
setup method on your plugin. Such method has to hack the ij.Menus and
replace the pointer of "Compile and Run..." for your own. This is
trivially done by calling ij.Menus.getCommands() (which gives you a
Hashtable), and replacing the entry.
3) Put the macro to autoexecute on StartupMacros.txt, so that when
ImageJ is launched, you get your command in place.

Now you have your own 1.5-enabled compiler.

Albert