View unanswered posts | View active topics



Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Debugger Error on Vista 64 
Author Message
Member

Joined: Sun Jul 03, 2011 7:18 pm
Posts: 11
Debugger startup error: net.sf.jni4net.jni.JNIException: Can't initialize jni4net. (32bit vs 64bit JVM vs CLR ?)
JAVA_HOME: C:\Program Files\Java\jdk1.6.0_13\
Process architecture: 32bit ---> System.TypeInitializationException: The type initializer for 'net.sf.jni4net.jni.JNI' threw an exception. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at net.sf.jni4net.jni.JNI.Dll.JNI_GetDefaultJavaVMInitArgs(JavaVMInitArgs* args)
at net.sf.jni4net.jni.JNI.Init()
at net.sf.jni4net.jni.JNI..cctor()
--- End of inner exception stack trace ---
at net.sf.jni4net.jni.JNI.CreateJavaVM(JavaVM& jvm, JNIEnv& env, Boolean attachIfExists, String[] options)
at net.sf.jni4net.Bridge.CreateJVM()
--- End of inner exception stack trace ---
at net.sf.jni4net.Bridge.CreateJVM()
at net.sf.jni4net.Bridge.CreateJVM(BridgeSetup setup)
at FlashDebugger.DebuggerManager.Start()


Thu Jul 07, 2011 6:55 pm
Profile
Admin

Joined: Tue Aug 30, 2005 6:14 pm
Posts: 3034
Location: Finland
Do you have 32bit Java?


Thu Jul 07, 2011 7:47 pm
Profile WWW
Member

Joined: Sun Jul 03, 2011 7:18 pm
Posts: 11
I have 32-bit java here:
C:\Program Files (x86)\Java\jre6\bin\

If I changed my JAVA_HOME to that, it would break other stuff.


Thu Jul 07, 2011 8:14 pm
Profile
Admin

Joined: Tue Aug 30, 2005 6:14 pm
Posts: 3034
Location: Finland
Point your Flex SDK to that Java version by editing it's jvm.config file.


Thu Jul 07, 2011 9:34 pm
Profile WWW
Member

Joined: Sun Jul 03, 2011 7:18 pm
Posts: 11
Oddly, I can't convince Flex to load any JVM except C:\Program Files\Java\jdk1.6.0_13\. Even if I try changing the JAVA_HOME (restarting FD after each try here), It still loads C:\Program Files\Java\jdk1.6.0_13\.


Thu Jul 07, 2011 10:13 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Usually what works is to install Java & reboot - it shouldn't break existing stuff.


Fri Jul 08, 2011 12:08 pm
Profile WWW
Member

Joined: Wed Sep 08, 2010 3:51 pm
Posts: 63
I've been running FD4 on the 32-bit JVM, but ran into a new conflict where I now need to have my JAVA_HOME pointing to the 64-bit JVM.

I'm trying to edit jvm.config in the flexsdk by using:
java.home=D:\FlashDevelop\Tools\flexsdk\jre6

...but I still get:

Debugger startup error: net.sf.jni4net.jni.JNIException: Can't initialize jni4net. (32bit vs 64bit JVM vs CLR ?)
JAVA_HOME: D:\Program Files\Java\jdk1.6.0_26

Setting JAVA_HOME to the 32-bit path works okay, but setting jvm.config to that path doesn't. Does the above indicate that it wasn't successful in utilizing the java.home path?

I see from a comment in jvm.config, "if {java.home}/jre exists..." Does that mean it's expecting a full JDK install there (as opposed to just a JRE)? Any other tips for getting a working FD4 debugger on machines where JAVA_HOME points to 64-bit java?


Thu Aug 11, 2011 3:05 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
The debugger was rebuilt using jni4net which doesn't seem to accept a custom path to Java - we definitely need to find a solution here...


Thu Aug 11, 2011 3:27 pm
Profile WWW
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Actually found out it's possible to define a custom java home for jni4net - committed in SVN so the SDK's java.home will take precedence over the environment var.


Thu Aug 11, 2011 8:20 pm
Profile WWW
Member

Joined: Wed Sep 08, 2010 3:51 pm
Posts: 63
Confirmed the fix for this. My JAVA_HOME is pointing to 64-bit JDK, and java.home in flexsdk's jvm.config is pointing to 32-bit JRE -- everything is working as it should.

Thanks Philippe!


Sat Aug 13, 2011 1:03 am
Profile
Member

Joined: Sun Jul 03, 2011 7:18 pm
Posts: 11
Working great - thanks!!


Thu Aug 25, 2011 8:49 pm
Profile
Member

Joined: Wed Jun 29, 2011 10:31 am
Posts: 23
It's very important to notice that, even if you use another FLEX sdk in another folder, you have to use the jvm.config file that lies inside the FlashDevelop's FlexSDK folder.
I have many versions of the Flex SDK and edited each jvm.config, so I was a bit confused why it didn't work.


Sat Jan 21, 2012 1:30 pm
Profile
Member

Joined: Tue Sep 15, 2009 8:17 am
Posts: 49
Hello,

I am having this same issue, but, after reading this chain, I cannot get it sorted out.

I went into jvm.config and added this:

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

Now I get a complaint from FD that some file cannot be found. Here is the entire output:

Building BlogPostImageMaker
mxmlc -load-config+=obj\BlogPostImageMakerConfig.xml -debug=true -incremental=true +configname=air -o obj\BlogPostImageMaker635215889592623421
Starting java as: C:\Program Files (x86)\Java\jre7\bin\java.exe
INITIALIZING: Adobe Flex Compiler SHell (fcsh)
Starting new compile.
Loading configuration file C:\Dev_Area\flex_sdks\flex_4.5\frameworks\air-config.xml
Loading configuration file C:\Dev_Area\www\flash\Focht\Blog Image Builder\source_new\obj\BlogPostImageMakerConfig.xml
obj\BlogPostImageMaker635215889592623421 (1947192 bytes)
(fcsh)Build succeeded
Done(0)
The system cannot find the file specified

take care,
lee


Mon Dec 02, 2013 7:04 am
Profile
Member

Joined: Tue Sep 15, 2009 8:17 am
Posts: 49
BTW, I am using Windows 7 Pro 64-bit


Mon Dec 02, 2013 7:07 am
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
@kleelof doesn't seem to be a Java issue: the build worked.
Does your Flex SDK include bin/adl.exe?


Mon Dec 02, 2013 4:10 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 23 posts ]  Go to page 1, 2  Next

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.