10 Replies Latest reply on Jun 2, 2010 6:20 AM by Vivek Lakhanpal

    java applets in air apps?

    chexmixisyummy Level 1
      I'm beginning an intranet app that depends on a 3D display that runs as a java applet. I'm just discovering AIR, and it looks amazing, so I hope it will support inclusion of java applets in html-based projects. Unfortunately this project requires it (I haven't found a non-java-based solution capable of interactive uv-mapped 3D object display, and am open to suggestions). If AIR can support it, I'm all in.

        • 1. Re: java applets in air apps?
          You could write your AIR app in Flex and make use of Papervision3D. Then convert to an AIR file if need be.
          • 2. Re: java applets in air apps?
            madsamurai Level 1
            thanks, j.t.g.
            I've been looking at Papervision3D, and I'm not sure if it will support what I'm able to do with wireFusion. It does look as tho it supports UV maps now, which it didn't last time I looked into it a couple of months ago. I'm building a 3d art placement interface for t-shirt printing, which will allow the user to upload their artwork, see it on a 3d model of their chosen shirt, and move and scale that artwork interactively on the model.

            Papervision3d looks like it might be possible to do that, but I haven't been able to get any straight answers from the forum, and they don't seem to have any real description of their capabilities/specs (at least not where they're easy to find).

            Director11 has some 3d capability as well, and possibly could be combined with flash for a 3d shockwave display that I expect would run in AIR apps... but again, I can't seem to find anything that says for sure whether Director11 supports UV maps (tho I have seen some tutorials about interacting with flash based textures that looks promising).

            Unity3D looks nice too, but requires a plugin to display, so I assume that's out if I go with AIR.

            There's a demo of what I'm trying to accomplish at http://alleycat.chadroyer.com/wf/tshirt_std_mf.html if it helps to see what I need. The form on that page is not what will be used, just a generic output from wirefusion to test all the javascript input. It takes a minute to start up, so be patient. You can click on the 'send "on" to front art' button to display the artwork on the front of the shirt, and you'll be able to drag it around.

            I'd really like to find a non-java alternative anyway (air or no), and Papervision would save me over a thousand bucks if it would work for me, as well.

            Also do you know if papervision would allow interaction via javascript? I've not used Flex (tho I'm relatively handy with AS). I'd really like to use the aptana jaxer stuff with AIR here rather than get into a language I don't know.

            Thanks again.
            • 3. java applets in air apps?
              pacohernandezg Level 1
              Then, is it possible to run an applet inside an AIR application?

              I need to use a PKCS#11 card for digitally signing documents. I had Flex and Applet inside an HTML page and made it possible to interconnect Flex with the applet through ExternalInterface and JSObject. The applet was responsible for signing the document, but we need to use AIR now and I don't know how to sign the documents from the AIR application.

              Thanks a lot.
              • 4. Re: java applets in air apps?
                xwisdom Level 1
                Hi you might want to check out Sandy3D for flash


                It would be great if Flash/Flex support built-in 3D
                • 5. Re: java applets in air apps?
                  Oliver Goldman Adobe Employee
                  pacohernandezg: No, Java applets cannot run inside AIR applications.

                  Oliver Goldman | Adobe AIR Engineering

                  • 6. Re: java applets in air apps?
                    Vivek Lakhanpal Level 1



                    Now that we have AIR2.0, Is there any way I can have applet inside my AIR app?


                    We have some software purchased as an applet. Now we want to create AIR app version of our flash based web application. What all are the possibilities do I have to get this thing working in AIR app?




                    • 7. Re: java applets in air apps?
                      timjowers2 Level 1



                      I think you can talk via webpage integration or through sockets... obviouskly app has to be signed.

                      • 8. Re: java applets in air apps?
                        thilgen Level 4



                        With the new NativeProcess support in AIR 2 you could launch a JAR file (if Java was installed) and have the Java application communicate with your AIR Application through STDOUT, STDIN, and STDERR.


                        However, I get the impression that you are probably looking for tighter integration than that, like invoking Java calls directly from within AIR.


                        Sadly we do not yet offer that support in AIR - suggest you file a feature request here: http://ideas.adobe.com/air




                        Chris Thilgen

                        AIR Engineering

                        • 9. Re: java applets in air apps?
                          Vivek Lakhanpal Level 1

                          Thanks Chris,

                          I think that's what i was looking for answer other then No and Sockets. Actually i am a novice to Java so have to discuss it with some java guy how that things works. And we might have to contact back our seller from whom we brought that applet if he can help us in it.


                          Actually it's a screensharing applet. So it gets initiated of it's own when page with flash app launches and then applet just send back events which we capture in javascript and inform back our flash app through Javascript+flash communication.


                          Secondly regarding a reply above yours "I think you can talk via webpage integration or through sockets... obviouskly app has to be signed." Although i didn't get the first portion. But it seems if I put java inside AIR with NativeProcess as you told I have to get app signed. What all I have to do to get that signed.



                          Vivek Lakhanpal.


                          • 10. Re: java applets in air apps?
                            Vivek Lakhanpal Level 1

                            Hi Chris,


                            When i am trying to launch a jar file i am getting "Error: Error: Error #3219: The NativeProcess could not be started. '%1 is not a valid Win32 application.".


                            Actually it's a java applet which can be launched from command line using a batch file like:java -jar xyz.jar %1 %2 %3 %4 %5 %6 %7 %8 %9


                            but as AIR is not running batch file. I tried simply passing xyz.jar as the executable file. But it's giving error mentioned above. How can i launch jar file in AIR.


                            Actually it's a simple java applet file which starts with some specific input parameters and it has some public methods which we can calls from javascript. It throw event with some specific output parameters which we catch in javascript and work as per the output values.


                            Can I make it working in AIR using simply NativeProcess stuff? Or it comes under "tighter integration or Java AIR"? In that case i will file a feature request .

                            It would be great at the same time if you can suggest me other way using which i can get this thing working with AIR2 if not NativeProcess.