Running Java bytecode on the Android - Sun JVM on top of DalvikVM

26

Solution 1

The OpenJDK makes use of native code so it would be a non-trivial port... there is at least one VM (JikesRVM) that is written in Java, unfortunately it is not a completely working implementation of Java.

Since DalvikVM runs classes that were converted from .class files it should be possible to convert the classes over. Then the "only" issue is when languages generate bytecode on the fly - for that it would require the extra step of converting the generated bytecode over to the DalvikVM format while the program is running on the DalvikVM.

Hmmm.... sort of a JITT (Just In Time Translator) that covertes class files to a DalvikVM files at runtime on the phone. I wonder how slow that would be.

Solution 2

try GNURoot app (proot ptrace container) with debian Wheezy;
apt-get update
apt-get install openjdk-7-jre
/usr/lib/jvm/java-7-openjdk-armel/jre/bin/java ...
(including long path)

Solution 3

technically it should be possible to interpret hotspot byte-code on dalvik vm or dalvik's byte-code on hotspot, but it will never be efficient (not mentioning elegant) design for a long run. the cost of doing that might become very high especially with respect to maintenance in the future evolution of such a split ecosystem.

i think, from the very beginning, dalvik vm is a matter of power/market control rather than innovative effort to improve java virtual machine ecosystem. dalvik vm and hotspot vm are lake two highway bridges across the same river build in parallel five meters from each other. it divides and brings confusion to java technological ecosystem.

google is, in my opinion, definitely the technological leader with innovative contributions over last decade that dwarf far more conservative oracle, but in this very subject they have shaken the java ecosystem in nearly destructive way. we (programmers) should strive for a single uniform solution to this problem. that is the main idea behind the concept of "virtual machine" anyway - it should not belong to neither google nor oracle.

Solution 4

In the meantime I have found a possible solution (only JavaME):

Share:
26
Christopher
Author by

Christopher

Updated on July 09, 2022

Comments

  • Christopher
    Christopher almost 2 years

    I currently have following data structure:

        VarA     VarB     VarC
    0   08/2005  06/2005  NaN   
    1   07/2014  08/2014  09/2014   
    2   09/2005  10/2005  01/2004       
    3   05/2005  NaN      02/2002
    

    I need to bring my data into the following pivot form, that is a table with three columns, sorted after ID (the ID is the index), and date:

    ID Var  Date
    0  VarB 06/2005
    0  VarA 08/2005
    1  VarA 07/2014
    1  VarB 08/2014
    1  VarC 09/2015
    2  VarC 01/2004
    2  VarA 09/2005
    2  VarB 10/2005
    3  VarC 02/2002
    3  VarA 05/2005
    

    What's the best approach to solve this with pandas? Thanks in advance!