Skip to main content
Known Participant
July 3, 2011
Answered

Error initializing Java Runtime Environment. You may need to reinstall Flash.

  • July 3, 2011
  • 15 replies
  • 67979 views

...This is really annoying.

I work with adobe cs5. Recently, it started to not work. I would have to restart it over and over to get it to compile an swf properly. So I am trying cs5.5. I get this error "Error initializing Java Runtime Environment.  You may need to reinstall Flash."

So im like OK....Thats helpful....

-reinstalls flash-

"Error initializing Java Runtime Environment.  You may need to reinstall Flash."

...

-reinstalls java-

-reinstalls flash-

-reinstalls adobe flash cs5.5-

"Error initializing Java Runtime Environment.  You may need to reinstall Flash."

...

-google-

So I come across this post. Follow it exactly.

"Error initializing Java Runtime Environment.  You may need to reinstall Flash."

...

I change the thingy in the file to Xmx1024M

"Error initializing Java Runtime Environment.  You may need to reinstall Flash."

...

I come to the forums.

What do I do now?

This topic has been closed for replies.
Correct answer Interactive Developer

I found a solution, which works for me.

Just delete the jvm.ini file under the temporary folder location. In windows it would be below path.

C:\Users\USERNAME\AppData\Local\Adobe\FLASH_VERSION\en_US\Configuration\ActionScript 3.0

Eg. C:\Users\admin\AppData\Local\Adobe\Flash CS6\en_US\Configuration\ActionScript 3.0

As soon as you start the Flash, a defult jvm.ini will be created automatically, in that location and your flash works fine.

Acutally the error comes due to the corroupt jvm.ini file (Too large values > 256 cause the error appear. Eg. Xmx1024m ) which gets created in temporary configuration forlders automatically during the Flash Installation.

Everytime Flash starts its looks for the jvm.ini file and allow the maximum initalized memory to the JVM.

15 replies

Known Participant
December 11, 2017

Lol I wrote this when I was like 19. Glad it still helps everyone.

Also kglad & ned sorry for back then. I was a bit frustrated. I didn't mean to take it out on you.

December 10, 2017

Hello, guys!

I have suffered the same issue for several days, changing jvm.ini, pathes, and so on...

But none of these tweaks worked for me! This annoying problem remained as a tick!

And later I found another solution in one russian forum.

Some guy have written that his Windows7 (x64) lacks those packages:

Microsoft Visual C++ 2010 Redistributable - x86 10.0.40219   (x32)

Microsoft Visual C++ 2010 Redistributable - x64 10.0.40219  

Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.6161   (x32)

Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.6161

I had one of them, but to act for sure I have reinstalled a huge bundle of these.

And, holly crap, bingo! This disgusting error vanished, and export to swf begin to work!

January 27, 2015

Intro:

Finally I got near to roots of that mysterious Error

"Error initializing Java Runtime Environment.  You may need to reinstall Flash."

So here is what I'm found out + Bugfix

JavaPatch for Adobe Flash CS5 / CS6...     Ver #1 [ 21.01.2014 ]

======================================

This is the fix the bug in Flash tell you all the time that

Java could not be loaded. The effect of this error is that

Actionscript will not work.

Flash gives a little misleading error messages that tells you that

"There is no Actionscript in the current Project"

background information:

The problem is that the Java Virtual Machine.dll demands on startup

250MB huge contiguous memory blocks, but the 2GB-Virtual address

space of the Flash.exe process is already filled with various loaded dll's

BEFORE you continue ensure that you install/copied JRE 1.8.0 update 31 to

%ProgramData%\Adobe\CS5\jre\

For testing check if ...Adobe\CS5\jre\bin\java.exe starts

(and shows a help about available commands)

The Patch is for 32-bit version only!

(however the problem is probably not in the 64-Bit Version - since there a process has a much large more 'space')

Well SIMPLE FIX / Workaround:

Use 64-Bit version of Adobe Flash !

TechDetails:

Java's JVM.dll loaded in Ollydebug -  The patched / change bytes are red.

^-Note that String ASCII "NUMA page alloc..." - will be a great 'link' to easily find that location in other JVM-versions to applied the patch there. Open jvm.dll in Ollydebug open String Ref. Windows and search for the string...

Download instructions:

  1. Right click on picture above and download it.
  2. Drag/open  the *.jpg in / into Winrar / 7-Zip 
    OR
    Rename 'Flash-CSX-jvm-JavaPatch #1.7z.jpg' -> 'Flash-CSX-jvm-JavaPatch #1.7z' so you open it by doubleclick

-> My creative solution for that A-Dope-board missing 'Attach file feature'

Tested:

with Adobe Flash CS5 + JRE 1.8.0 update 31


More Techstuff:

Some of my notes that might be useful:

Note the memory is not real allocated in the way it can be use since to write or read from it is just allocated as

MEM_RESERVE like you see in the screenshot above. And freed just a little alter.

It seems that java just checks if it could possible the maximal the JVM is made for.

Note the problem is not that you have to less physical RAM installed.

It's more related how memory is organise.

Well in 32 Bit each process has 4GB (or well practically Windows limits this to 2GB).

0x00000000 to 0x7FFF0000

This space is virtual and not actually claimed (else you would very quickly run out of RAM) but it a kind of potential or Adress system. Na sorry that'll be to offtopic to explain all the basic's about memory.

Adobe Flash CS5 calls

jvm.dll!JNI_CreateJavaVM( OUT **p_vm, OUT **p_env, IN *vm_args);

The 'vm_args'

typedef struct JavaVMInitArgs {

    jint version;  00010004

  1. /* user classes */

  -D java.class.path=

  C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\ActionScript 3.0\;

  C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\ActionScript 3.0\asc_authoring.jar;

  C:\Program Files\Adobe\Adobe Flash CS5\Common\"...

  2. /* set native library path */

  -D java.library.path=

  C:\ProgramData\Adobe\CS5\jre\bin

  3.

  -D java.Home=C:\ProgramData\Adobe\CS5\jre

  4. classpath append

  -X bootclasspath/a:

  ;.;

  C:\Program Files\Java\jdk1.7\jre\lib\ext\QTJava.zip

  5. Headless mode is a system configuration in which the display device, keyboard, or mouse is lacking. Headless mode support has been available since the J2SE 1.4 platform.

  -D java.awt.headless=true

    jboolean ignoreUnrecognized; 1

} JavaVMInitArgs;

So for any further exploration about this Java problem setting a breakpoint to 'JVM.dll!JNI_CreateJavaVM' will be a great startpoint

Participant
December 4, 2017

I can't seem to find someone with a mac that has that error, I just installed high sierra and am running cs6 (I know I should have the cloud but yeah not falling for the subscription pyramid scheme). I use flash everyday (yeah still) for work and now it just quits like every 20 minutes. I need help! please

Colin Holgate
Inspiring
December 4, 2017

Some of this discussion is 6 years old, and the advice may have changed with more recent machines.

Edit the jvm.ini file so that instead of -Xmx128m is says -Xmx1024m. That should give it four times as much memory to work with.

The jvm.ini file is here:

~/Library/Application Support/Adobe/Flash CS6/en_US/Configuration/ActionScript 3.0/jvm.ini

May 7, 2014

Viren, you made my night ;] You've saved my Adobe Flash! It worked fine, thx!!!

Interactive DeveloperCorrect answer
Participant
December 23, 2012

I found a solution, which works for me.

Just delete the jvm.ini file under the temporary folder location. In windows it would be below path.

C:\Users\USERNAME\AppData\Local\Adobe\FLASH_VERSION\en_US\Configuration\ActionScript 3.0

Eg. C:\Users\admin\AppData\Local\Adobe\Flash CS6\en_US\Configuration\ActionScript 3.0

As soon as you start the Flash, a defult jvm.ini will be created automatically, in that location and your flash works fine.

Acutally the error comes due to the corroupt jvm.ini file (Too large values > 256 cause the error appear. Eg. Xmx1024m ) which gets created in temporary configuration forlders automatically during the Flash Installation.

Everytime Flash starts its looks for the jvm.ini file and allow the maximum initalized memory to the JVM.

January 2, 2013

Viren  - This worked for me, thanks.

Participant
June 16, 2012
Participating Frequently
April 3, 2012

I tried to uninstall java and flash as told here http://forums.adobe.com/message/2975044#2975044

but nothing helped.

Eventually I find out it was engough to specify -Xmx256m instead of -Xmx512m, and everything started working.

Too large values > 256 cause the error appear. Too low -Xmx128m makes flash to yield while publish.

Participant
March 16, 2012

This might not help, but I finally fixed this issue, none above worked for me.

I see all jvm.ini files (one in user folder one in adobe folder) so -Xmx1014m read -Xmx128m, then i delete the enviorment variables

JAVA_PLUGIN_WEBCONTROL_ENABLE

JAVA_TOOL_OPTIONS

added vars

QTJAVA : C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip

resintalled flash (although i don't think this helped) and java runtime, and it worked after that. This was a VERY VERY frustrating issue, not a big fan of java runtime after this.

Participant
January 22, 2012

Hello,

I had the same problem and after trying everything one day I did a "boot-time scan" with my antivirus -avast- and it found some threat with some java files or something, I just leave the program do its job and delete everything what it was wrong. After the restart I opened Flash and it worked fine. No more "error initializing java runtime environment you may need to reinstall flash cs5"

I hope this help.

September 2, 2011

I don't know if it's going to help but:

Last time I had random crashes within flash IDE it was caused by my anti-virus which identified some flash DLL as being threatening.

(It was because a flash security leak had been found in flash player, and my AV took rather drastic measures about this issue)

In your case perhaps your Anti-virus has problems with JRE, or some component used by Flash.

The solutions may be to try deactivating your AV for some time to check if the problem remains.

Hope it helps.