Wrong Java invocation when packaging AIR?

When I try to run Package AIR Application and try to package iOS ad hoc distribution, I have successful compilation put packaging fails:

Failed to package AIR application iOS_SARS.ipa:
            Exception in thread "main"
            java.lang.Error: Unable to find llvm JNI lib in:
            /Applications/Adobe Flash Builder 4.6/sdks/4.6.0/lib/adt.jar/Darwin
            /Applications/Adobe Flash Builder 4.6/sdks/4.6.0/lib/aot/lib/x64
            /Applications/Adobe Flash Builder 4.6/sdks/4.6.0/lib/adt.jar
            /Applications/Adobe Flash Builder 4.6/sdks/4.6.0/lib
            at adobe.abc.LLVMEmitter.loadJNI(LLVMEmitter.java:572)
            at adobe.abc.LLVMEmitter.(LLVMEmitter.java:585)
            at com.adobe.air.ipa.AOTCompiler.generateExtensionsGlue(AOTCompiler.java:516)
            at com.adobe.air.ipa.AOTCompiler.generateMachineBinaries(AOTCompiler.java:1151)
            at com.adobe.air.ipa.IPAOutputStream.createIosBinary(IPAOutputStream.java:284)
            at com.adobe.air.ipa.IPAOutputStream.finalizeSig(IPAOutputStream.java:599)
            at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java:90)
            at com.adobe.air.ipa.IPAPackager.createPackage(IPAPackager.java:217)
            at com.adobe.air.ADT.parseArgsAndGo(ADT.java:557)
            at com.adobe.air.ADT.run(ADT.java:414)
            at com.adobe.air.ADT.main(ADT.java:464)

Here is what is on ADT command line:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -d32 -Dapplication.home=/Applications/Adobe Flash Builder 4.6/sdks/4.6.0 -Xmx384m -Dsun.io.useCanonCaches=false -Djava.awt.headless=true -Duser.language=en -Duser.region=en -Xmx512m -jar /Applications/Adobe Flash Builder 4.6/sdks/4.6.0/lib/adt.jar -package -target ipa-ad-hoc -storetype PKCS12 -keystore XXX -storepass XXX -provisioning-profile XXX.mobileprovision XXX.ipa XXX/ios_descriptor.xml -platformsdk /Applications/Xcode.app/Contents/Developer -C XXX.swf -C XXX icons

I have installed Java 1.7.0 build 9, but on my System is 1.6.0 and that is what IDEA is invoking.

Any ideas what is the problem and what could I try?


I've found 2 people with the same problem at Adobe's forum. One of them said that he has this error when using java 7 and doesn't have with java 6. Can this be the case that /System/Library/Java/JavaVirtualMachines/1.6.0.jdk in fact contains java 7?
By default IntelliJ IDEA launches ADT using the same java version as for IntelliJ IDEA itself. You can override it by setting java.home property in the [Flex SDK]/bin/jvm.config file (i.e. /Applications/Adobe Flash Builder 4.6/sdks/4.6.0.bin/jvm.config in your case).

Truly speaking I don't know the cause of the problem and so far can only suggest to play with java version and AIR SDK version and to ask at Adobe's forum.


Tried installing AIR 3.5, changing Java version, but nothing worked...

I also found this, and I'm sure that I'm not the only person trying to publish for iOS from IntelliJ, so there must be people working successfully... My problem is only... how can I join them? :-)


Will you have the same problem with a very simple basic app?
As the problem comes from adt tool you may check that you'll get the same error from command line and ask Adobe's support. So far I don't know what can we do at IntelliJ IDEA side.


I tried now publishing from Flash Pro CS6 and I have the same issue there. So I guess problem is with Adobe support for Java.

Thank you Alexander for your effort. If I succeed with solving the problem, I'll try to post the solution for later reference.



I had to remove Java 7 installed for packaging to work. I've deleted all under /Library/Java/JavaVirtualMachines so then OS used default version 6. Running Package AIR Application doesn't throw that error anymore.


Thank you for investigation.


Please sign in to leave a comment.