Java 是否有可能在 Android 或 Blackberry 上运行小程序?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2433338/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there a possibility to run applets on Android or Blackberry?
提问by Muhammad Maqsoodur Rehman
This is what the Java site www.java.comsays:
这是 Java 站点www.java.com所说的:
"KVM, the virtual machine for mobile devices, is the counterpart of JVM (Java virtual machine). It is used to run applets and applications written with Java technology on mobile devices. KVM must be installed by the manufacturer. It is NOT available for download or installation by consumers".
“KVM,移动设备的虚拟机,是JVM(Java虚拟机)的对应物。它用于在移动设备上运行使用Java技术编写的小程序和应用程序。KVM必须由制造商安装。它不适用于由消费者下载或安装”。
Now Android has a customized virtual machine called DVM (Dalvik Virtual Machine). Can we compare it with KVM? Wonder if we can further reprogram DVM to incorporate features of KVM to run applets on Android? Same goes for Blacberry, is there a possibility?
现在Android有一个定制的虚拟机,叫做DVM(Dalvik Virtual Machine)。我们可以将其与 KVM 进行比较吗?想知道我们是否可以进一步重新编程 DVM 以结合 KVM 的功能在 Android 上运行小程序?黑莓也一样,有可能吗?
回答by CommonsWare
Wonder if we can further reprogram DVM to incorporate features of KVM to run applets on Android?
想知道我们是否可以进一步重新编程 DVM 以结合 KVM 的功能在 Android 上运行小程序?
There is very little overlap between what Android provides and what an applet needs, such as AWT. Since applets, as a technology, have been dead for over a decade, I cannot imagine that it would be worth anyone's effort to modify the Android firmware to include the necessary classes and figure out how to run an applet in an Android activity.
Android 提供的内容与小程序所需的内容(例如 AWT)之间几乎没有重叠。由于作为一项技术的小程序已经消亡了十多年,我无法想象任何人都值得努力修改 Android 固件以包含必要的类并弄清楚如何在 Android 活动中运行小程序。
回答by Eric Giguere
Applets will NOT run on the BlackBerry for various reasons, most importantly that the AWT classes applets depend on are not available on the BlackBerry. The UI model is very different, consisting of either the MIDP UI model or the BlackBerry model, neither of which is AWT.
出于各种原因,Applet 不会在 BlackBerry 上运行,最重要的是,Applet 所依赖的 AWT 类在 BlackBerry 上不可用。UI 模型非常不同,由 MIDP UI 模型或 BlackBerry 模型组成,两者都不是 AWT。
Going forward, you should be using JavaScript for browser-side computing, it's the only thing that will work crossbrowser on mobile platforms. Applets are very much dead technology, unfortunately.
展望未来,您应该使用 JavaScript 进行浏览器端计算,这是唯一可以在移动平台上跨浏览器工作的东西。不幸的是,Applet 是非常死的技术。
回答by Max Weber
Applets are not supported on the phones by default. Customers can buy a browser which supports it such as the Cloud browser. We have a technology to convert existing Java applets to allow them to run on mobile devices without a special browser. If your company is in need of this service please contact us through our unitedswe website.
默认情况下,手机不支持小程序。客户可以购买支持云浏览器的浏览器。我们有一项技术可以转换现有的 Java 小程序,使它们无需特殊浏览器即可在移动设备上运行。如果贵公司需要此项服务,请通过我们的unitedswe 网站与我们联系。
回答by user816101
I've seen applications running cdlc/mid profile on android, as Android underlying is a Linux kernel anyway, after you root your device, I don't see there's difficulties installing another JVM under linux, which in turns support CDC profiles.
我见过在 android 上运行 cdlc/mid 配置文件的应用程序,因为无论如何,Android 底层都是 Linux 内核,在你 root 设备后,我不认为在 linux 下安装另一个 JVM 有困难,而后者又支持 CDC 配置文件。
But the problem is will it integrate the default browser well? Will 2x JVM (Dalvik/ OpenJava lets say) make the memory management alot more complecated?
但问题是它会很好地集成默认浏览器吗?2x JVM(可以说是Dalvik/OpenJava)会使内存管理更加复杂吗?
回答by adw
Jave applet is still alive, many organizations use it, a lot of HMI's use it,also banks, I wanted to buy few android tablets and use it in our factory for our technicians, But no applet support, so i will go on use my android tablet as game machine for my children.
Jave 小程序还活着,许多组织都在使用它,很多人机界面都在使用它,还有银行,我想购买一些安卓平板电脑并在我们的工厂中为我们的技术人员使用,但没有小程序支持,所以我将继续使用我的安卓平板电脑作为我孩子的游戏机。
回答by m0rtadelo
I can execute Java applets on my S2 with Ubuntu 12.04 LTE & firefox browser with my rooted samsung stock android phone (4.1.2).
我可以使用 Ubuntu 12.04 LTE 和 firefox 浏览器在我的 S2 上执行 Java 小程序,并使用我的 samsung stock android 手机 (4.1.2)。
Install linux for Android, configure your Linux distro to run oracle/sun Java applets and Voila!
为 Android 安装 linux,配置您的 Linux 发行版以运行 oracle/sun Java 小程序和瞧!
回答by Juergen Hartelt
Oracle is offering something called Application Development Framework Mobile. If I understand the page correctly, this framework helps to create java applications for ios and android. You would have to abandon the applet idea, though, I guess.
Oracle 正在提供称为Application Development Framework Mobile 的东西。如果我正确理解页面,这个框架有助于为 ios 和 android 创建 java 应用程序。不过,我想你将不得不放弃小程序的想法。
回答by S0AndS0
As stated by others, rooting your Android device and then loading Linux and then installing Java to that OS works just fine. Here's a guide you may use and modify that I compiled for a different ~.jar file I wanted to run
正如其他人所说,在你的 Android 设备上扎根,然后加载 Linux,然后将 Java 安装到该操作系统上就可以了。这是您可以使用和修改的指南,我为要运行的不同 ~.jar 文件编译了该指南
http://forums.rptools.net/viewtopic.php?f=12&t=24082&sid=3092b606dd5c7278e0908f021956b9f3
http://forums.rptools.net/viewtopic.php?f=12&t=24082&sid=3092b606dd5c7278e0908f021956b9f3
Best part was once I got port forwarding figured out for my network I was able to host a public server from within this little environment.
最好的部分是一旦我为我的网络找到了端口转发,我就能够在这个小环境中托管公共服务器。
Hope this helps you all because I've tested this with other Java dependent software and the ARMel and ARMhf versions of Java's JDK work great.
希望这对大家有所帮助,因为我已经用其他 Java 相关软件对此进行了测试,并且 Java JDK 的 ARMel 和 ARMhf 版本运行良好。
# Edit/Update # http://www.timelesssky.com/blog/running-debian-armhf-alongside-androidAfter following the above link's instructions I was able to run- apt-caxh search java -And Orical's Java JDK was available to install though the package manager when running Wheezy Hard Float on Android with Debian Kit app. Next step is to see if Kali will install via the shroot method offered by this app's modded code.
# 编辑/更新 # http://www.timelesssky.com/blog/running-debian-armhf-alongside-android按照上述链接的说明,我能够运行-apt-caxh 搜索 java-Orical 的 Java JDK 可用在使用 Debian Kit 应用程序在 Android 上运行 Wheezy Hard Float 时通过包管理器安装。下一步是查看 Kali 是否会通过此应用程序的修改代码提供的 shroot 方法进行安装。