开发者

Calling a Java class from Adobe Air app

I have to develope a simple desktop application. I have to call my Jar behind it. I am thinking that I should have Adobe Air interface that will call my Jar.

Is it possible in Air. If yes, then I am going to learn Adobe Air, otherwise I开发者_如何学编程 will develope it in Swing.

Thanks.


I appreciate this is an old question, but you don't need to use Merapi.

Native processes are supported from Air 2.0 onwards.

See the API docs for the NativeProcess object.

Also, take a look at this video, which demonstrates starting tomcat by invoking a jar. So what Tahir Akram is asking is definitely possible now (although I don't think it was possible in 2009).


Air won't know what to do with the jar file. If it was allowed Air could call java and pass it the jar (assuming java was installed), but I don't believe AIR apps have the capability to do system calls.

You're probably best off just sticking with Java, or replacing the jar with a flash library that accomplishes the same thing. You really don't want to mix technologies if you can avoid it.


I am new to AIR and I was also looking how to integrate AIR and JAVA , I found this website, which may be of help

http://merapiproject.net/

Merapi is a technology that can be used as a messaging bridge between applications that run in the Adobe Flash player or Adobe AIR and applications written in Java.


You certainly can call your Jar files using NativeProcess. Like Python, you will need to create frozen binaries of your jar files into an .exe file. I think JSMooth is a Java executable wrapper that converts jar to exe.

In fact, JSmooth will look for the JVM and if it's not installed, it will redirect user to fetch the download.

The nice thing with Python, you can bundle the python program in with your .py files with the help of py2exe.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜