如何运行在Android上普通的旧的Java应用程序 [英] How to run plain old java application on Android

查看:206
本文介绍了如何运行在Android上普通的旧的Java应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想运行在Android上的Java应用程序。它不具有一个用户界面,并嵌入码头为servlet containr。它实现了通常由网络为其用户访问一个Web应用程序,但我需要这个离线的Andr​​oid平板电脑上运行。

I want to run a Java application on Android. It does not have a user interface and embeds Jetty as a servlet containr. It implements a web application that is normally accessed online by its users but I need to run this offline on Android tablets.

这是在所有可能的?所有我能找到的关于如何开发Android应用程序的信息。我只是想相当于 Java的罐子... 的任何信息将受到欢迎。

Is this at all possible? All I have been able to find is information on how to develop Android apps. I simply want the equivalent of java -jar ... and any information would be welcome.

推荐答案

目前在Android中没有类似的这种。 Android使用一个DVM代替一个正常的JVM中,这是基于阿帕奇和谐

There is no equivalent of this in Android. Android uses a DVM instead of a normal JVM, which is based on Apache Harmony.

您在任何情况下需要重新编译应用程序,因为DVM仅执行是从普通的Java字节code由 DX - 工具随Android SDK的。

You would in any case need to recompile the application since the DVM only executes Dalvik-Bytecode which is created from normal Java-Bytecode by the dx-tool shipped with the Android SDK.

另外,为什么你需要运行一个平板电脑设备上的服务器应用程序?

Also, why do you need to run a Server-Application on a tablet device?

这篇关于如何运行在Android上普通的旧的Java应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆