1 Reply Latest reply on May 1, 2013 2:51 PM by jason.m.hanna

    Add Java parameter to ADT launched by Flash Builder


      Hi All,


      I'm suddenly having a problem with JDK/JRE 7 that is preventing me from exporting a release build of our mobile application for iOS.


      Running on Windows XP,  Flash Builder 4.7 installed as a plug-in to SpringSource Tool Suite 3.1.0 (Eclipse Juno).


      During the export of release build I'm hitting the following error:



      Error occurred while packaging the application:
      Exception in thread "main" java.lang.IllegalArgumentException: Comparison method violates its general contract!
          at java.util.TimSort.mergeLo(Unknown Source)
          at java.util.TimSort.mergeAt(Unknown Source)
          at java.util.TimSort.mergeCollapse(Unknown Source)
          at java.util.TimSort.sort(Unknown Source)
          at java.util.TimSort.sort(Unknown Source)
          at java.util.Arrays.sort(Unknown Source)
          at adobe.abc.Algorithms$Pool.sort(Algorithms.java:377)
          at adobe.abc.GlobalOptimizer$Abc.sort(GlobalOptimizer.java:2667)
          at adobe.abc.GlobalOptimizer.emit(GlobalOptimizer.java:2787)
          at adobe.abc.LLVMEmitter.optimizeABCs(LLVMEmitter.java:527)
          at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:336)
          at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler.java:472)
          at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:82)
      Compilation failed while executing : ADT


      This appears to be a known issue with some code when migrating from Java 6 to Java 7. Seemingly you can work around this by applying the following parameter:




      Unfortunately I can't find where the java parameters that are used to launch the ADT are specified:


      I've found the following files and updated them to include this parameter, but changes don't seem to be picked up by Flash Builder:


      <install-dir>\Adobe\Adobe Flash Builder 4.7\sdks\4.6.0\bin\adt.bat
      <install-dir>\Adobe Flash Builder 4.7\eclipse\plugins\com.adobe.flash.compiler_4.7.0.349722\AIRSDK\bin\adt.bat


      Can anybody here help? Frustrating as this used to work. No idea what's changed.





      PS - I've also tried rolling back to JDK/JRE 6. Same export release build process is giving a different errors about an uncaught C exception.