[Insight-users] Wrapping ITK 3.16 to Java with non-default target jvm

Lassi Paavolainen lassi.paavolainen at jyu.fi
Fri Nov 6 04:23:36 EST 2009


Hi,

Maybe Gaetan or someone else who has done this kind of changes can help 
me.

I'm building ITK 3.16 and wrapping it to Java (and Python) using WrapITK 
0.2 shipped with ITK. After some problems everything works well. I'm doing 
this in Windows and I have JDK 1.6. Now I need to build java classes to 
JVM target 1.5. Is there a way to add this target somewhere in CMake?

I got it almost working after adding "-target 1.5" in ARGS of two custom 
commands using ${JAVA_COMPILE} in CMakeLists.txt at 
ITK/Wrapping/WrapITK/Java. After building ITK again I now have about 12k 
class files with target 1.5 but itkbase.class, JavaCWD.class and 
SwigRuntimeJNI.class have target 1.6.

I greped JAVA_COMPILE but only reference was in that CMakeLists.txt file 
I made a change. Grepping javac gave me results in ITKJavaJar.vcproj and 
JavaTests.vcproj but neither of those are used to build those three files 
as far as I know. Does anyone know where those files are built and where I 
can put this -target 1.5 arg?

Some other problems I had, not related to this:
- I needed to change maximum heap size to get Java wrappings to work by 
adding -J-Xms and -J-Xmx args to same place I added target arg.
- Wrapping Review library to Java is failing because of too many objects 
in a library error (more than 65536).

Lassi

-- 
Lassi Paavolainen, M.Sc
Software Engineer, PhD Student in Computer Science
BioImageXD (http://www.bioimagexd.net)
lassi.paavolainen at jyu.fi


More information about the Insight-users mailing list