diff options
author | Elliott Hughes <enh@google.com> | 2015-03-20 22:09:28 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-03-20 22:09:28 +0000 |
commit | a965e36cd4275cc49b44304a3d2181eb5999ec53 (patch) | |
tree | e5394c5af3d1d62f01c6ec4a30502eef17732921 | |
parent | 188f9a3e49d97a84ad55f9064ffc71295b4a392c (diff) | |
parent | 0661627cf641ea71d8f5a78deb758e49b12c2d3a (diff) | |
download | android_dalvik-a965e36cd4275cc49b44304a3d2181eb5999ec53.tar.gz android_dalvik-a965e36cd4275cc49b44304a3d2181eb5999ec53.tar.bz2 android_dalvik-a965e36cd4275cc49b44304a3d2181eb5999ec53.zip |
am 0661627c: am 51deeeae: Merge "Remove references to the simulator."
* commit '0661627cf641ea71d8f5a78deb758e49b12c2d3a':
Remove references to the simulator.
-rw-r--r-- | docs/hello-world.html | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/docs/hello-world.html b/docs/hello-world.html index 7491a2821..d988e2f4b 100644 --- a/docs/hello-world.html +++ b/docs/hello-world.html @@ -88,127 +88,6 @@ See <a href="debugger.html">Dalvik Debugger Support</a> for more information about using debuggers with Dalvik. - -<h2>Working with the desktop build</h2> - -<!-- largely lifted from -http://groups.google.com/group/android-porting/browse_thread/thread/ab553116dbc960da/29167c58b3b49051#29167c58b3b49051 ---> - -<p> -The Dalvik VM can also be used directly on the desktop. This is somewhat -more complicated however, because you won't have certain things set up in -your environment, and several native code libraries are required to support -the core Dalvik libs. -</p><p> -Start with: - -<pre> - . build/envsetup.sh - lunch sim-eng -</pre> - -You should see something like: - -<pre> - ============================================ - TARGET_PRODUCT=sim - TARGET_BUILD_VARIANT=eng - TARGET_SIMULATOR=true - TARGET_BUILD_TYPE=debug - TARGET_ARCH=x86 - HOST_ARCH=x86 - HOST_OS=linux - HOST_BUILD_TYPE=release - BUILD_ID= - ============================================ -</pre> - -</p></p> -This configures you to build for the desktop, linking against glibc. -This mode is NOT recommended for anything but experimental use. It -may go away in the future. -</p></p> -You may see <code>TARGET_BUILD_TYPE=release</code> or <code>=debug</code> -or possibly nothing there at all. You may want to replace the -<code>lunch</code> command with -<code>choosecombo Simulator debug sim eng</code>. -</p></p> -Build the world (add a <code>-j4</code> if you have multiple cores): - -<pre> - make -</pre> - -</p></p> -When that completes, you have a working dalvikm on your desktop -machine: - -<pre> - % dalvikvm - E/dalvikvm(19521): ERROR: must specify non-'.' bootclasspath - W/dalvikvm(19521): JNI_CreateJavaVM failed - Dalvik VM init failed (check log file) -</pre> - -</p></p> -To actually do something, you need to specify the bootstrap class path -and give it a place to put DEX data that it uncompresses from jar -files. You can do that with a script like this: - -<blockquote><pre> -#!/bin/sh - -# base directory, at top of source tree; replace with absolute path -base=`pwd` - -# configure root dir of interesting stuff -root=$base/out/debug/host/linux-x86/product/sim/system -export ANDROID_ROOT=$root - -# configure bootclasspath -bootpath=$root/framework -export BOOTCLASSPATH=$bootpath/core.jar:$bootpath/ext.jar:$bootpath/framework.jar:$bootpath/android.policy.jar:$bootpath/services.jar - -# this is where we create the dalvik-cache directory; make sure it exists -export ANDROID_DATA=/tmp/dalvik_$USER -mkdir -p $ANDROID_DATA/dalvik-cache - -exec dalvikvm $@ -</pre></blockquote> - -</p></p> -The preparation with <code>dx</code> is the same as before: - -<pre> - % cat > Foo.java - class Foo { public static void main(String[] args) { - System.out.println("Hello, world"); - } } - (ctrl-D) - % javac Foo.java - % dx --dex --output=foo.jar Foo.class - % ./rund -cp foo.jar Foo - Hello, world -</pre> - -As above, you can get some info about valid arguments like this: - -<pre> - % ./rund -help -</pre> - -</p></p> -This also shows what options the VM was configured with. The sim "debug" -build has all sorts of additional assertions and checks enabled, -which slows the VM down, but since this is just for experiments it -doesn't matter. - -</p></p> -All of the above applies to x86 Linux. Anything else will likely -require a porting effort. If libffi supports your system, the amount of -work required should be minor. - </p></p> <address>Copyright © 2009 The Android Open Source Project</address> |