I am trying to execute Java program in Android. Used the link How to execute the dex file in android with command? as reference. My question is, can I run the Java program on the emulator from eclipse? When I tried adb install HelloWorld.apk(in command prompt), it says AndroidManifest.xml is missing. Do I have an option to do it? Please help.
Android uses the Dalvik VM, instead of the Java VM. Due to this, you cannot execute standard java programs on an Android device. Additionally, Android programs are supported by various XML files like the Android Manifest, layout files, resource files etc. The Android Manifest is especially important, as it contains information on which part of the app can be launched, which is a service or a receiver, what permissions the apps needs, what hardware and software features the app needs, which version of Android is compatible with it etc.
So in short: No, you cannot execute normal java programs on Android.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With