Is it possible to run Android apps in JVM?
<p>I am trying to run symbolic testing on Android apps to collect some information, for example, the execution tree. Thus I want to run it in JVM instead of the emulator because there are a lot of existing symbolic testing tools for Java applications. </p>

<p>I tried to run HelloAndroid which is a sample app outputting "Hello Android" on TextView by </p>

<pre><code>java -cp ./ -cp $ANDROID_LIB/android.jar HelloAndroid.class
</code></pre>

<p>where HelloAndroid.class is compiled Java class before converting into .dex. But JVM is keeping complaining that </p>

<pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: HelloAndroid/class
Caused by: java.lang.ClassNotFoundException: HelloAndroid.class
</code></pre>

<p>I am confused because I've already specify the HelloAndroid class. And there is no complex statements or calls into Android library in the source code:</p>

<pre><code>package com.example.helloandroid;

import android.app.Activity;
import android.os.Bundle;
    import android.widget.TextView;

public class HelloAndroid extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        TextView tv = new TextView(this);
        tv.setText("Hello, Android");
        setContentView(tv);
    }   
}
</code></pre>

<p>I am new to Android and am struggling to make this small app to execute in JVM. So would you please give me some suggestion? I am wondering if I am on the right way, I mean try to execute simple apps in JVM? Thanks!</p>
