Skip to content, Skip to search

Changes

Jython Scripting

183 bytes added, 04:49, 21 June 2018
m
improve formatting of last paragraph in "Bundle Package"
It is possible to upload .py scripts to update sites too, without packaging into a jar. The advantage of jar are that they allow to define dependencies more systematically.
'''NB ''' : Script implementing "ImageJ menu macro" and "utilitary scripts" that are used as imported modules in other macros '''should be packed in separate jar files ''' ! Indeed, if not explicitly mentioned, the jython interpreter only looks in the Jars/Lib folder to import module, so the .jar containing the "utilitary scripts" should be put there, while the jar containing the "ImageJ menu macro" can be put either in the Plugin or script/Plugin folderin order to appear in the ImageJ menu. However  Contrary to the scripts contained in this second jar will Jars/Lib, the menu macro scripts are not compiled, and as explained above they can not be visible by imported in other scripts since the Plugin folder do not reside in the Jython interpretersearch path by default.
This is the reason why a given project is rather distributed in 2 different jar files as explained [http://forum.imagej.net/t/using-self-written-jython-modules-in-imagej/2280 here].
Emailconfirmed
88
edits