kmoeller
Posts: 3
Joined: Mon Jul 27, 2009 8:28 pm

Java Heap Size Problem

I am using Advanced Installer Enterprise 7.1.2
I have a Java application that gives the following message when the heap size
it set to anything above 700MB.

JNI Exception: Failed to create the Java VM
Reason: not enough memory.

My computer is Running Windows XP and has 2GB of RAM.
If I try running the application with a batch file I can set the heap up to 1200MB.
I also tried the debug version of the stub that I found in another thread and it runs fine.

These are the virtual machine paramaters I have set: -Xms1024M -Xmx1024M -XX:+AggressiveHeap

Thanks any help.

Kirk Moeller
U.S. Forest Service.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Java Heap Size Problem

Hi,
If I try running the application with a batch file I can set the heap up to 1200MB.
Yes it will run, but it will not guarantee a correct execution of the program at all times.

A discussion on Java heap Size problems you can find here: http://www.advancedinstaller.com/forums ... =heap+size

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kmoeller
Posts: 3
Joined: Mon Jul 27, 2009 8:28 pm

Re: Java Heap Size Problem

You say the batch file cannot be certain of execution, Ok. However that doesn't explain why the debug version of stub works when the non-debug version does not. In addition I have used other installer products that use an exe to run java programs and they have no difficulty running the program with memory set up to around 1200, 1300 MB.

The fact is I need this value much higher that 700MB, otherwise I will be forced to use a batch file. My software is a simulation model that requires a very large amount of memory. While we normally run it on a 64bit workstation with 20GB RAM, we at times need to run on a laptop running 32bit xp for demo purposes.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Java Heap Size Problem

Hi,
In addition I have used other installer products that use an exe to run java programs and they have no difficulty running the program with memory set up to around 1200, 1300 MB.
The amount of heap that can be asserted can depend on options used from the Settings tab, like “Single Instance” or “Splash Screen”. It depends also on the operating system.

Could you please send us the .aip file to support at advancedinstaller dot com so we can investigate it.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”