5 Replies Latest reply: May 13, 2012 8:15 AM by pupu梦 RSS

    Package Java ANE file for desktop

    Durss Community Member



      I'm trying to package an ANE file for desktop and am almost bald now :/.


      I just made an HelloWorld extension with a simple "sayHello" method that simply returns the string "Hello World".

      I made a JAR file of it, created the extension's XML definition as follow :

      <extension xmlns="http://ns.adobe.com/air/extension/3.1">
                          <platform name="Windows-x86">


      I compiled my SWC, extracted the library.swf file out of it (is it still necessary or ADT finally does it itself.?) and use the

        • 1. Re: Package Java ANE file for desktop
          Durss Community Member

          Damn CTRL+S.. someday i'll stop doing this on my browser. Weird that it submits the post anyway :/..


          So, i use this batch file to package the ANE :

          set sdk_directory=D:\Softwares\flex_sdk_4.6.0.23201B

          set air_directory=%sdk_directory%\bin

          set root_directory=D:\NativeExtensions\HelloWorld\

          set library_directory=%root_directory%\flash\assets

          set signing_options=-storetype pkcs12 -keystore "D:\NativeExtensions\HelloWorld\flash\assets\certificate.p12" -storepass XXXX

          set dest_ANE=%library_directory%\HelloWorld.ane

          set extension_XML=%library_directory%\HelloWorldANE.xml

          set library_SWC=%library_directory%\HelloWorld.swc

          set library_SWF=%library_directory%\library.swf

          "%air_directory%"\adt -package %signing_options% -tsa none -target ane "%dest_ANE%" "%extension_XML%" -swc "%library_SWC%" -platform Windows-x86 "%library_SWF%" -C %library_directory%


          And all i get is the following error :

          Missing native library implementation "HelloWorld.jar" for platform Windows-x86


          I put my HelloWorld.jar aside the batch file, tried to put it on a "Windows" folder and many other things... but can't get rid of this error.

          I can't find nothing about this error anywhere (neither here http://help.adobe.com/en_US/air/build/WSBE9908A0-8E3A-4329-8ABD-12F2A19AB5E9.html) so i'm a bit stuck.



          I'm certainly missing a point here but don't know what.


          Any help would be much apreciated because i have no idea where the problem comes from :/



          • 2. Re: Package Java ANE file for desktop
            Durss Community Member

            Thank god!!

            I finally got it working.


            The problem came from the command line.

            I included all the "assets" folder on the extension instead of setting just the JAR file as  follow :

            "%air_directory%"\adt -package %signing_options% -tsa none -target ane "%dest_ANE%" "%extension_XML%" -swc "%library_SWC%" -platform Windows-x86 "%library_SWF%" "%library_JAR%"

            • 3. Re: Package Java ANE file for desktop

              Hi,Durss,Do you this program a success? Do you have Java API for window-x86?

              • 4. Re: Package Java ANE file for desktop
                Durss Community Member

                Absolutely not


                Actually i think it would be hard to get a JAVA ANE runing on windows.

                Because by defautl windows just doesn't know how to run a jar file.

                I guess we would have to package the JRE/JVM/whatever with the application or something like that... anyway, it's far outside of my small skills ^^..


                At least i succeed having a java extension working on android, so the extension is good.

                The problem is more the execution.

                • 5. Re: Package Java ANE file for desktop
                  pupu梦 Community Member

                  In the window to run on it is still possible, whether you want to pack Java virtual machine.

                  May I wanted to write a jar bag similar android.jar..

                  But Java and air, are running in the virtual machine, with Java to do the expansion of the window, feel little sense...