is it possible to run java SE or Java ME app on android ???
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
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/
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,
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.
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.