[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orekit Developers] [SOCIS] problem converting a jar to android
- To: orekit-developers@orekit.org
- Subject: [Orekit Developers] [SOCIS] problem converting a jar to android
- From: MAISONOBE Luc <luc.maisonobe@c-s.fr>
- Date: Sun, 18 Sep 2011 16:27:18 +0200
- User-agent: Internet Messaging Program (IMP) H3 (4.3.9)
Hello,
I tried to use the "easy way" instructions here:
<https://www.orekit.org/forge/projects/socis-2011/wiki/HowToBuildToAndroid> to
convert a simple standalone jar file to check loading performances
(see <https://issues.apache.org/jira/browse/MATH-650>).
I created the initial jar, checked it worked well in a Java
environment under Linux, converted it to android using the dx program
and tried to run it on the tablet. I did it on the tablet using a
terminal application, not adb shell because I have some USB problems
with my tablet.
the command:
dalvikvm -classpath test.jar org.apache.commons.math.LucTestPerformance
produced the following error:
Dalvik VM unable to locate class 'org/apache/commons/math/LucTestPerformance'
java.lang.NoClassDefFoundError: org.apache.commons.math.LucTestPerformance
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException:
org.apache.commons.math.LucTestPerformance in loader
dalvik.system.PathClassLoader[test.jar]
at: dalvik.system.PathClassLoader.fincClass(PathClassLoader.java:251)
at: java.lang.ClassLoader.loadClass(ClassLoader.java:548)
at: java.lang.ClassLoader.loadClass(ClassLoader.java:508)
... 1 more
I have looked inside the converted jar. It contains several html files
and a large classes.dex file. I was not able to open this dex file bu
running the "strings" unix command on it shows all the class names I
expected, including the main one. The manifest file also specifies the
main class is the one I pass on the command line (it seems I must
provide this name despite it is already in the manifest).
Any idea about what I am doing wrong ?
My tablet is running Android 3.0 and DalvikVM is version 1.5.0.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.