I understand that android does not use a JRE and Google has build a platform only for android. But an android device is not really different from e.g a Raspberry PI. So why is it not possible to just install Oracles JVM on a rooted android device?
Asked
Active
Viewed 8,131 times
3
-
Umm... Android already uses Java and it's own JVM, APK's are compiled Java applications – acejavelin Jun 19 '17 at 16:57
-
1Android may use its own JVM. But why is it not possible to use the official oracle JVM? – NyxCode Jun 19 '17 at 17:20
-
If you are looking for a technical answer, I don't have one, that is beyond my knowledge of Android, I just know it doesn't work. Probably because regardless of most people, Android is NOT Linux and it is different. There are Java Emulators for Android such as JBED, JBlend, or NetMite although they do require root access and some tweaking, but most were developed for Android 2.X and I can't speak to whether they work in modern devices. Perhaps someone else can give you a better answer (which is why I am purely in comments and not providing an official answer) – acejavelin Jun 19 '17 at 17:30
1 Answers
2
Why is it not possible to just install Oracles JVM on a rooted android device?
- You simply don't just install something on Android. Installing apps requires a bunch of stuff.
Also: You can't just install ordinary applications, frameworks etc like on a PC (there are apps that allow this in their own container). - There is an ongoing dispute between Oracle (Java) and Google (Android) about Java APIs and code. (https://en.wikipedia.org/wiki/Oracle_America,_Inc._v._Google,_Inc.)
- You are already running a Java virtual machine that is integrated into the system (DalvikVM, Android Runtime ART) and is able to run basically all non-proprietary Java code (no
sun
package). - If you really want to run Java code, make a simple one button app that calls the code you want.

GiantTree
- 4,062
- 1
- 20
- 26