开发者

run j2me app on android?

is it possible to run java SE or Java ME a开发者_开发技巧pp on android ???


If you search for "J2ME runner android" on Google, you'll find some hits for projects which claim to allow you to run J2ME projects on Android.

e.g. http://www.netmite.com/android/

I'm not sure what you mean by Java SE in this case. Technically Dalvik is a lot closer to J2SE than to J2ME. A large set of the APIs are there, and code will likely cross-compile without issue. You can even include a lot of J2SE JARs in your project and use the build tools to re-compile them from bytecode to DEX.

http://en.wikipedia.org/wiki/Dalvik_(software)

The infrastructure is vastly different, however, and you're not going to get an application written/compiled for a desktop running a standard JVM to work on Android without changes and recompiling.


No, there is no Java ME support. You need to change the user interface to operate on Android.

However, Java SE's base libraries are mostly supported, with exceptions (such as no Swing). You will still need to give you application a View and an Intent otherwise the system won't be able to launch it (there is no built-in "console mode").


In order to know exactly which libraries are supported by Android and which ones were left out, you might want to check Java Libraries Supported by Android

In there Ed Burnette mentions the following,

Supported The following standard packages are supported in Android as of the latest release candidate. Consult the Java 2 Platform Standard Edition 5.0 API documentation for information on how to use them.

* java.io - File and stream I/O
* java.lang (except java.lang.management) - Language and exception
* support
* java.math - Big numbers, rounding, precision
* java.net - Network I/O, URLs, sockets
* java.nio - File and channel I/O
* java.security - Authorization, certificates, public keys
* java.sql - Database interfaces
* java.text - Formatting, natural language, collation
* java.util (including java.util.concurrent) - Lists, maps, sets, arrays, collections
* javax.crypto - Ciphers, public keys
* javax.net - Socket factories, SSL
* javax.security (except javax.security.auth.kerberos, javax.security.auth.spi, and javax.security.sasl)
* javax.sound - Music and sound effects
* javax.sql (except javax.sql.rowset) - More database interfaces
* javax.xml.parsers - XML parsing
* org.w3c.dom (but not sub-packages) - DOM nodes and elements
* org.xml.sax - Simple API for XML

Not supported These packages, normally a part of the Java 2 Platform Standard Edition, are not supported by Android.

* java.applet
* java.awt
* java.beans
* java.lang.management
* java.rmi
* javax.accessibility
* javax.activity
* javax.imageio
* javax.management
* javax.naming
* javax.print
* javax.rmi
* javax.security.auth.kerberos
* javax.security.auth.spi
* javax.security.sasl
* javax.swing
* javax.transaction
* javax.xml (except javax.xml.parsers)
* org.ietf.*
* org.omg.*
* org.w3c.dom.* (sub-packages)

Third party libraries In addition to the standard libraries listed above, The Android SDK comes with a number of third-party libraries for your convenience.

* org.apache.commons.codec - Utilities for encoding and decoding
* org.apache.commons.httpclient - HTTP authentication, cookies, methods, and protocol
* org.bluez - Bluetooth support
* org.json - JavaScript Object Notation


I know this is an old thread, but since I spent a looong time looking for a solution for myself here, I thought I should share, for whoever finds this thread when googling.

I also tried the above suggestions like Jbed and Netmite J2ME Runner, and had little luck with them.

Later I found PhoneME: http://davy.preuveneers.be/phoneme/?q=node/28

That is in my opinion the best JavaME emulator for Android.


You can do it quite easily as there are many ways to run java apps on android. Specific application called Java Emualtors can do it quite easliy.

There are four most popular java emulators for android viz, JBED, PhoneME, Jblend and NetMite. There are arranged in order of their preference. You can use phoneme for unrooted device, however if your device is rooted try any of the remaining three applications.

To know how to install and configure all of these application just follow the link: http://androiddelta.com/run-java-apps-android-using-best-java-emulators/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜