In Android OS, I am able to run several Java JAR files compiled under desktop environment. For instance, jtransforms
May I know why is it so? I thought the JVM from Oracle and Dalvik VM from Google uses two different byte code formats? Why the JAR file compiled by Java SE able to execute in Android?
I assume you are simply including the jar file in your android project? Then it works, as during the build process it is converted (the same is done for your own class files!) to dex format. This is done with the dex (dx) tool. Using ADT in eclipse it is automatically done for you. It’s available for manual use in the android sdk of course too:
Under
android-sdk-windows\platform-tools\dx.batif on windows.