2

Since I've updated my Flash Develop and installed the latest versions of Air/Flex SDK I can no longer debug application because of the following error:

Debugger startup error. For troubleshooting see: http://www.flashdevelop.org/wikidocs/index.php?title=F.A.Q
Error details: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
   em net.sf.jni4net.jni.JNI.Dll.JNI_GetDefaultJavaVMInitArgs(JavaVMInitArgs* args)
   em net.sf.jni4net.jni.JNI.Init()
   em net.sf.jni4net.jni.JNI.CreateJavaVM(JavaVM& jvm, JNIEnv& env, Boolean attachIfExists, String[] options)
   em net.sf.jni4net.Bridge.CreateJVM()
   em net.sf.jni4net.Bridge.CreateJVM(BridgeSetup setup)
   em FlashDebugger.DebuggerManager.Start(Boolean alwaysStart)
[Capturing traces with FDB]
...

I'm using Windows 7 x64, FlashDevelop v4.6.4, JDK v1.7, AIR SDK v14.

António Almeida
  • 9,620
  • 8
  • 59
  • 66

3 Answers3

5

Solved it by changing jvm.config, you can find it here:

%USERPROFILE%\AppData\Local\FlashDevelop\Apps\flexairsdk\4.6.0+14.0.0

I modified the parameter java.home (line ~27) to:

java.home=C:\Program Files (x86)\Java\jre7

Note:
You can find the path to your SKD folder in your SetupSDK.bat file, FLEX_SDK=...

Very important:
Even if you're on a 64bit system, the java.home must point to the 32bit java installation!

Community
  • 1
  • 1
António Almeida
  • 9,620
  • 8
  • 59
  • 66
  • Do you know any solutions for those using the 'ascsdk'? I don't have the 'flexairsdk' but still get the same error (probably because it's pointing to the wrong Java runtime). Even if I change JAVA_HOME in my system variables, doesn't fix it [Edit: oh, and there isn't any jvm.config file in the ascsdk folder either]. – chamberlainpi Oct 31 '14 at 13:40
  • 1
    Hi @bigp, I changed the target to *ascsdk* and I couldn't find a way to solve the problem, as you said, the *jvm.config* file don't exist. I will keep trying, if you find an answer please post it. – António Almeida Nov 01 '14 at 15:35
  • 2
    Using flexairsdk\4.6+16.0.0, I found jvm.config in %USERPROFILE%\AppData\Local\FlashDevelop\Apps\flexairsdk\4.6.0+16.0.0\bin – Anders Lindén Jan 29 '15 at 21:37
0

See tools->Troubleshooting problems using the Flex SDK @

http://www.flashdevelop.org/wikidocs/index.php?title=AS3#Installing_Adobe_Flash

ds011591
  • 494
  • 8
  • 19
0

Try downloading JAVA SE for Windows x86 (32bits)

  1. http://www.oracle.com/technetwork/java/javase/overview/index.html
  2. Downloads -> JRE -> Windows x86

Then be sure that JAVA_HOME points to this version (C:\Program Files (x86)\Java\jreX.X.X.X), not the 64bits (C:\Program Files\Java...)

Mario M.
  • 416
  • 2
  • 10