[Insight-users] Java Bindings and heap size (fwd)
Lassi Paavolainen
lassi.paavolainen at jyu.fi
Tue Nov 24 07:25:15 EST 2009
Hi Julien,
I had similar problem with WrapITK 0.2 and WrapITK 0.3 using Java wrappings,
except I had too small heap size if I can remember correctly. My workaround was
to add working heap size args to javac. This can be done by adding your working
heap size as arg to JAVA_COMPILE to
WrapITK/Languages/Java/CMakeLists.txt (one place)
WrapITK/Languages/Java/Tests/CMakeLists.txt (two places)
I guess there isn't currently any cleaner way to do it. I think people with
good knowledge of CMake can add javac arguments as CMake parameter in couple of
minutes.
Regards,
Lassi
On Tue, 24 Nov 2009, Julien Michel wrote:
> Dear WrapITK developpers and users,
>
> When trying to compile WrapITK 0.3.0 with Java bindings on my windows system,
> I meet the following error :
>
> Compiling java proxies: org.itk.javabase
> Error occurred during initialization of VM
> Could not reserve enough space for object heap
> Could not create the Java virtual machine.
> Project : error PRJ0019: Un outil a retourné un code d'erreur à partir de
> "Compiling java proxies: org.itk.javabase"
>
> Looking at the command line more carefully, it seems that javac is using the
> following options : -J-Xms256m -J-Xmx2G
>
> If i try to run javac with no other arguments, I still got the error :
>
> C:\Program Files\Java\jdk1.6.0\bin>javac -J-Xms256m -J-Xmx2G
> Error occurred during initialization of VM
> Could not reserve enough space for object heap
> Could not create the Java virtual machine.
>
> If I use -J-Xmx1G instead, everything is running fine.
>
> Is there a way to manage java memory usage in WrapITK cmake configuration ?
> Has anyone met this problem before ?
>
> Regards,
>
> Julien
--
Lassi Paavolainen, M.Sc
PhD Student in Computer Science
University of Jyväskylä
Software Engineer
BioImageXD (http://www.bioimagexd.net)
lassi.paavolainen at jyu.fi
More information about the Insight-users
mailing list