a d
a d

Reputation: 572

Concept - java and android

Android uses Java via Dalvik Virtual Machine.

can I understand from this quote : Any Java class file or any jar file can run on any android device?

If no, why?

Upvotes: 1

Views: 96

Answers (2)

Mehdi Khademloo
Mehdi Khademloo

Reputation: 2812

I'm not 100% sure, but...

1) YES, you can import any jar file on any android application and run on any android device. because it's compiled on Java bytecode already, and now, it can run on DVM.

2) NO, you can't use any Java class file on android because some packages don't port on android API.

Upvotes: 3

smolus
smolus

Reputation: 125

The answer is no. Although .apk files are somewhat simlar to .jar files Android reads them completly diffrently than windows for example. On top of that Android has its own API so you have alot of stuff that can be used only in android and you have alot of stuff that you cant use on android.

Upvotes: 1

Related Questions