Installation/Windows

From MiToBo
Revision as of 14:32, 2 November 2015 by Misiak (talk | contribs) (Created page with "== Windows == <br/>'''Notice:''' The ImageJ directory path depends on your ImageJ installation. Following, we assume that the ImageJ home directory is set up to ''C:\Program Fil...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Windows


Notice: The ImageJ directory path depends on your ImageJ installation. Following, we assume that the ImageJ home directory is set up to C:\Program Files\ImageJ\.<br\>

Use MiToBo with an existing ImageJ installation

For installing MiToBo into an existing ImageJ installation perform the following steps:

  1. go to the MiToBo-bin\plugins\ directory
    • copy the Mi_To_Bo.jar to your ..\ImageJ\plugins\ directory
    • copy all jars from MiToBo-bin\plugins\jars\ to your ..\ImageJ\plugins\jars\ directory except the ij.jar and jars already existing
      (Notice: MiToBo requires explicite versions of some jars, other versions may not work probably, see requirements.)

  2. go to the MiToBo-bin\macros\toolsets\ directory
    • copy the MiToBo_Runner.txt to your ..\ImageJ\macros\toolsets\ directory

Native libraries

Some operators of MiToBo use native code via the Java Native Interface (JNI).
The 'lib/' directory in the zip file provides precompiled JNI-libraries for 32-Bit (lib/libwin32) Windows systems.
At the moment, JNI-libraries for Windows are only available for 32-Bit architectures, but can also be used with an 64-Bit architecture (see below).
For using the native code add the libraries to the library path.
The path to the native libraries must be available to any java application which uses MiToBo operators that depend on these libraries.

32-Bit architecture
  1. go to the MiToBo-bin\lib\ directory
    • copy the libwin32 directory to your ..\ImageJ\ directory

  2. configurate your ImageJ startup
    • edit ImageJ configuration file ..\ImageJ\ImageJ.cfg and add the library path

      -Djava.library.path="C:\Program Files\ImageJ\libwin32"

      Example of an ImageJ.cfg file:
   C:\Program Files\ImageJ\
   C:\Program Files\Java\jre6\bin\javaw.exe
   -Djava.library.path="C:\Program Files\ImageJ\libwin32" -Xmx1024m -cp "C:\Program Files\ImageJ\ij.jar" ij.ImageJ


  • as an alternative you can start ImageJ from command line
  • open your Windows command line
  • move to the ..\ImageJ\ directoy
  • type the following command:
  java -Djava.library.path="C:\Program Files\ImageJ\libwin32" -Xmx1024m -cp "C:\Program Files\ImageJ\ij.jar" ij.ImageJ
64-Bit architecture

Using a 64-Bit architecture requires a 32-Bit Java installed on the system to use the 32-Bit JNI-libraries.
Perform the following steps to run MiToBo on a 64-Bit architecture:

  1. go to the MiToBo-bin\lib\ directory
    • copy the libwin32 directory to your ..\ImageJ\ directory

  2. configurate your ImageJ startup
    • edit ImageJ configuration file ..\ImageJ\ImageJ.cfg and add the library path

      -Djava.library.path="C:\Program Files (x86)\ImageJ\libwin32"

      Example of an ImageJ.cfg file:
   C:\Program Files (x86)\ImageJ\
   C:\Program Files (x86)\Java\jre6\bin\javaw.exe
   -Djava.library.path="C:\Program Files (x86)\ImageJ\libwin32" -Xmx1024m -cp "C:\Program Files (x86)\ImageJ\ij.jar" ij.ImageJ


  • as an alternative you can start ImageJ from command line
  • open your Windows command line
  • move to the ..\ImageJ\ directoy
  • type the following command:
  C:\Program Files (x86)\Java\jre6\bin\javaw.exe -Djava.library.path="C:\Program Files (x86)\ImageJ\libwin32" -Xmx1024m -cp "C:\Program Files (x86)\ImageJ\ij.jar" ij.ImageJ


Notice: The -Xmx1024m variable sets the maximum memory heap size of Java to 1024 MB. This value can be increased, depending on your installed system memory and architecture.<br\>