Open GoogleCodeExporter opened 8 years ago
The reason is when I ssh login the BOOTCLASSPATH is different
This is ssh login
BOOTCLASSPATH=/data/data/com.spartacusrex.spartacuside/files/system/classes/andr
oid.jar:/system/framework/core.jar:/system/framework/ext.jar:/system/framework/f
ramework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
THE WORK AROUND
export BOOTCLASSPATH=$BOOTCLASSPATH:/system/framework/bouncycastle.jar
Maybe you can figure out why it is different.
This is login to the device terminal, There is sitll a core-junit.jar which is
not in the ssh login CLASSPATH
BOOTCLASSPATH=/data/data/com.spartacusrex.spartacuside/files/system/classes/andr
oid.jar:/system/framework/core.jar:/system/framework/bouncycastle.jar:/system/fr
amework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy
.jar:/system/framework/services.jar:/system/framework/core-junit.jar
Original comment by chunlinyao@gmail.com
on 7 Jan 2012 at 7:32
This workaround does not work for me.
I have the exact same symptoms, but the cure doesn't do it, and the error
messages look a bit different.
And, other things don't work from a remote login, but work fine when directly
on the phone, such as jping.
The following is what I get when trying to compile the example hello.java:
# javac hello.java
Dalvik VM unable to locate class 'com/spartacusrex/spartacuside/external/javac'
java.lang.NoClassDefFoundError: com/spartacusrex/spartacuside/external/javac
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException:
com.spartacusrex.spartacuside.external.javac
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
... 1 more
And jping:
# jping google.com
Dalvik VM unable to locate class 'com/spartacusrex/spartacuside/external/jping'
java.lang.NoClassDefFoundError: com/spartacusrex/spartacuside/external/jping
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException:
com.spartacusrex.spartacuside.external.jping
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
... 1 more
Original comment by areemt...@gmail.com
on 4 Apr 2013 at 3:41
As a P.S. to my previous comment:
A careful examination of the differences between the set of environment
variables one gets on the phone itself versus remote login show quite a few
differences. I have not yet figured out which ones matter.
Here are the ones on the phone that are NOT in the set from remote login, or
are different:
LOOP_MOUNTPOINT=/mnt/obb
ASEC_MOUNTPOINT=/mnt/asec
ANDROID_PROPERTY_WORKSPACE=9,131072
ANDROID_SOCKET_zygote=10
ANDROID_BOOTLOGO=1
BOOTCLASSPATH=/data/data/com.spartacusrex.spartacuside/files/system/classes/andr
oid.jar:/system/framework/core.jar:/system/framework/core-junit.jar:/system/fram
ework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar
:/system/framework/framework2.jar:/system/framework/android.policy.jar:/system/f
ramework/services.jar:/system/framework/apache-xml.jar:/system/framework/HTCDev.
jar:/system/framework/HTCExtension.jar:/system/framework/com.htc.framework.jar:/
system/framework/filterfw.jar:/system/framework/com.htc.android.bluetooth.jar:/s
ystem/framework/wimax.jar:/system/framework/com.orange.authentication.simcard.ja
r
PATH=/data/data/com.spartacusrex.spartacuside/files/bin:/data/data/com.spartacus
rex.spartacuside/files/local/bin:/data/data/com.spartacusrex.spartacuside/files/
android-gcc-4.4.0/bin:/data/data/com.spartacusrex.spartacuside/files/system/bin:
/data/data/com.spartacusrex.spartacuside/files/system/bin/bbdir:/sbin:/vendor/bi
n:/system/sbin:/system/bin:/system/xbin
PWD=/data/data/com.spartacusrex.spartacuside/files/system/src/helloworld
EXTERNAL_STORAGE=/mnt/sdcard
Here are the ones from the remote set that are NOT in the local set, or are
different:
ANDROID_PROPERTY_WORKSPACE=10,32768
ANDROID_BOOTLOGO=1
USER=username
BOOTCLASSPATH=/data/data/com.spartacusrex.spartacuside/files/system/classes/andr
oid.jar:/system/framework/core.jar:/system/framework/ext.jar:/system/framework/f
ramework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
PATH=/data/data/com.spartacusrex.spartacuside/files/bin:/data/data/com.spartacus
rex.spartacuside/files/local/bin:/data/data/com.spartacusrex.spartacuside/files/
android-gcc-4.4.0/bin:/data/data/com.spartacusrex.spartacuside/files/system/bin:
/data/data/com.spartacusrex.spartacuside/files/system/bin/bbdir:/sbin:/system/sb
in:/system/bin:/system/xbin
PS1=\[\033[01;32m\]$USER\[\e[1;31m\]\[\e[1;33m\]@\[\e[1;35m\]$HOSTNAME\[\033[00m
\]:\[\033[01;34m\]\w\[\033[00m\]\$
MKSH=/system/bin/sh
APK=/data/app/com.spartacusrex.spartacuside-1.apk
LOGNAME=username
EXTERNAL_STORAGE=/sdcard
Any help appreciated.
Original comment by areemt...@gmail.com
on 4 Apr 2013 at 3:47
Original issue reported on code.google.com by
chunlinyao@gmail.com
on 7 Jan 2012 at 5:58