1

I am on Mac 10.8.2, i have both java 1.6 (32/64bit enabled) and java 1.7 on my machine and the JAVA_HOME is pointed to java 1.6, but whenever I try to enable QML previewing in my momentics ide (QNX® Momentics® IDE for BlackBerry® 10 Native SDK, Version: 10.0.9), I get the error in the Title. looked a bit into the log under workspace/.metadata/.log, and it logged the following:

!MESSAGE QML Preview compatibility check log. Error: This Java instance does not support a 32-bit JVM.

How can I get the ide to point to java 1.6? Is it somewhere in the startup script of the application that I can change?

Thanks

wonderwall
  • 317
  • 1
  • 2
  • 10

2 Answers2

1

QNX Momentics is based on Eclipse, so you should be able to change the JVM used by editing the .ini file for the IDE. If your Momentics is installed in the default location, in Finder navigate to:

/Applications/bbndk/ide/macosx/x86/eclipse/

  1. Right click on qde.app (if you have extension hidden it might just be qde with the momentics icon) and choose Show Package Contents.
  2. Under /Contents/MacOS/ edit the qde.ini file in TextEdit.
  3. At the top of the file, before -vmargs add the following:

    -vm
    /path/to/your/java/jvm/here
    

    ie.

    -vm
    /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java
    
  4. Save the file and launch Momentics, and it should now be using the JVM you specified. Check your workspace/.metadata/.log after the startup to confirm this.

nonesuchnick
  • 627
  • 4
  • 17
  • Thanks! I tried your approach and it did was the the solution I was looking for previously. However, after examining the log again, i found that the error was caused by a plugin of the IDE (not the ide itself) (!ENTRY com.rim.tad.tools.qml.simulator 4 0 2013-03-02 19:43:14.724 !MESSAGE QML Preview compatibility check log. Error: This Java instance does not support a 32-bit JVM. Please install the desired version.), so unfortunately, that wouldn't have fixed the problem – wonderwall Mar 03 '13 at 00:55
0

I've met the same problem with you, I've tried @nonesuchnick 's answer but unfortunately that did not work for me.

And I've similar environment with you: I've got Java 1.7 (the Oracle one) and 1.6 (the Apple one) installed on my Mac (10.8.2).

I resolved my problem via this way:

  1. Delete Java 1.7 completely
  2. Check your NDK installer's md5 to ensure you've got the correct one.

To delete Java 1.7 completely, you'll need to delete the jdk1.7 folder under

/Library/Java/JavaVirtualMachines/

and delete the internet plugin JavaAppletPlugin.plugin under

/Library/Internet Plug-Ins

Then open terminal and type java -version to make sure that your PATH variables is correctly set to your java 1.6 path (I mean the Apple one).

Upon finish this, you can try to uninstall the BB10 NDK and reinstall it, then try to enable the QML Preview, this time it should work.

Reference: How do I uninstall Java 7 for my Mac?

dumbfingers
  • 7,001
  • 5
  • 54
  • 80