View unanswered posts | View active topics

Reply to topic  [ 4 posts ] 
Error: Could not create the Java Virtual Machine. 
Author Message

Joined: Mon Apr 16, 2012 5:03 am
Posts: 7
Reply with quote
Hi, I have problem after upgrading the flash develop Basically I know what is the problem, but I dont know how I can solve it.


I have a big swc (~200MB) to use in a project, so I get the "Error: Java heap space", I know I have to add more memory for the java to compile this big project, so I modified the build option to "-Xmx2048m" in the jvm.config in sdk folder.

However, I got an "Error: Could not create the Java Virtual Machine.", so I have to reduce from "-Xmx2048m" to "-Xmx1024m" for the java to successfully create the virtual machine.

Sadly, Since "-Xmx1024m", is not enough, I will get the "Error: Java heap space" again.

Since I could build the project in the previous version, it could either "set to '-Xmx2048m' and successfully created the JVM" or "set to '-Xmx1024m' and have enough heap space". So I am wondering what I can do in this version.

My PC has got 8GB ram, but I guess the 32bit java of FlashDevelop cannot make use of it.

I have installed .netframesworks 3.5 and 4 in windows 10. i have tried both java 1.6 and 1.7 32bits, the same problems occured.

Fri Jul 08, 2016 2:11 am

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
FlashDevelop now (at least dev builds) includes a 64bits version in the same program files directory.
I expect that you'll need Java 64bits as well but I didn't personally try.

Mon Jul 11, 2016 8:43 pm
Profile WWW

Joined: Mon Apr 16, 2012 5:03 am
Posts: 7
Reply with quote
thanks, it actually work!

Install 64 bit java 1.6, set java path in jvm.config, and I found that I have to use 4096MB of ram to build without exceeding java heap, so now we can use flashdev 64bit to build a huge project!

Tue Jul 12, 2016 4:03 am

Joined: Mon Mar 23, 2015 7:27 am
Posts: 2
Reply with quote
Open the Control Panel
Go to System
Go to Advanced Systems Properties
Then Environment Variables
In System Variables, click Add
New Variable Name: _JAVA_OPTIONS
New Variable Value: -Xmx512M
Click OK

That's it, your Java program should now be able to execute properly.
For those interested, Java -Xmx/s is the configuration parameter that control the amount of memory Java uses.

Xmx sets the maximum heap memory size
Xms sets the minimum heap memory size

More about...Java Virtual Machine

Wed Jun 28, 2017 5:34 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.