开发者

Can the android JVM run on a PC also?

开发者 https://www.devze.com 2022-12-20 17:06 出处:网络
Can the Android JVM run on a PC also? or is it limi开发者_如何学Cted to working on a mobile device only?

Can the Android JVM run on a PC also?

or is it limi开发者_如何学Cted to working on a mobile device only?

From what I understand, when you develop using eclipse it is emulated, not running the actual jvm correct?


Yes and no. The Android VM is actually called Dalvik VM. It executes dalvik executables (dex) which are normally packaged as Android Packages (apk) file. The dex files are created from Java byte code files (output of a java compile, .class files) which run on a regular jvm. Currently the Dalvik VM runs on ARM and MIPS based processors. When you talk about running on a PC I assume you are talking about a x86 based computer. In this case you need to use an emulator to run the vm. The standard emulator that is shipped with the Android SDK uses qemu (qemu site) to run emulator the standard arm processor.

There is also a porting effort to x86 under way but the most common way currently is emualtion.

In terms of android running on netbooks it all comes down to the processor again...

Also keep in mind that if you want to run Android applications on a PC you need more than just the VM. You basically need to run the whole linux stack (e.g. including video codecs and so on). The easiest way to do that is to run an emulator.


all the other answers are wrong. if you really do just want the VM, you can run dalvikvm on Linux.

you'll have to build it yourself though... see my answer to How do I make isolated dalvik for details on how to do that.


Yes, the Android SDK ships with an emulator to test your applications on PC.

Programs are compiled into Dalvik executable bytecode not Java bytecode. See http://en.wikipedia.org/wiki/Dalvik_virtual_machine for more details.


Yes it can, but it have to be ported to the actual PC architecture. No such thing exist ( yet ) AFAIK


Another clarification. The Android SDK emulator uses dalvik bytecode. The only way the jvm is involved is in the compilation process. Java source code -> java byte code -> davlik executable code...

0

精彩评论

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