[Insight-users] Java Bindings and heap size (fwd)

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Tue Nov 24 09:20:04 EST 2009


Hi,

Should I add an option in ccmake/cmake-gui - JAVAC_ARGS for example,  
to let the user pass some options to javac?
Would it solve the problem for both of you?

Regards,

Gaëtan


Le 24 nov. 09 à 13:25, Lassi Paavolainen a écrit :

> 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_____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091124/7c00222a/attachment.pgp>


More information about the Insight-users mailing list