PathClassLoader Issue

114 views
Skip to first unread message

MoggoDude

unread,
Oct 16, 2008, 6:47:26 AM10/16/08
to Android Internals
Hi,
I was woundering if someone could help me on a technical issue
concerning the PathClassLoader in Android SDK 1.0.
The problem I'm and other people, see blog,
http://groups.google.com/group/android-developers/browse_thread/thread/ae71de8061c7eabf/c601569b1636f9dc?lnk=gst&q=PathclassLoader#c601569b1636f9dc,
have experienced arrises when attempting to dynamically load classes.
Using the example in the
blog:

PathClassLoader loader = new PathClassLoader(
"/data/data/org.beo/beo.mylib/myLib.apk",
ClassLoader.getSystemClassLoader());
Class calledClass = null;
calledClass = loader.loadClass("beo.mylib.beoware");

produces the following error:
ERROR/dalvikvm(312): Can't open dex cache
'/data/dalvik-cache/data@data.....@classes.dex': No such file or
directory
09-26 00:03:34.928: INFO/dalvikvm(312): Unable to open or create cache
for
/data/data/....................apk'

This is rectified by shelling into the emulator using the adb utility
and changing the permissions on
the directory /data/dalvik-cache using chmod 777 .

The main concern I have is, what will be the permissions /data/dalvik-
cache on on a target device, such as the new HTC G1 phone ?
Users of any application using the PathClassLoader will propably not
be able to issues chmod 777 commands (can't expect them
to either). Consequently, this would render applications relying on
PathClassLoader inoperable. If anyone can help me with this issue,
it would be very greatly appreciated.

Regards,
MoggoDude

hackbod

unread,
Oct 16, 2008, 4:48:52 PM10/16/08
to Android Internals
Sorry, this is not supported for 1.0.

On Oct 16, 3:47 am, MoggoDude <chris.tucke...@gmail.com> wrote:
> Hi,
>      I was woundering if someone could help me on a technical issue
> concerning the PathClassLoader in Android SDK 1.0.
> The problem I'm and other people, see blog,http://groups.google.com/group/android-developers/browse_thread/threa...,

MoggoDude

unread,
Oct 17, 2008, 7:40:25 AM10/17/08
to Android Internals
Hi hackbod,
Thanks for your response. I just have a couple of questions
regarding your response, if you
could please answer, it would be greatly appreciated.

1) Why is this feature (Dynamic Class Loading) not supported in sdk
1.0. This is a crucial feature
required by some application.
2) Will it be supported on a target device such as the HTC G1 when it
is
lauched to the market soon.


Regards,
MoggoDude

hackbod

unread,
Oct 19, 2008, 2:10:29 PM10/19/08
to Android Internals
On Oct 17, 4:40 am, MoggoDude <chris.tucke...@gmail.com> wrote:
> 1) Why is this feature (Dynamic Class Loading) not supported in sdk

Because we didn't have time to implement it.

> 1.0. This is a crucial feature
>    required by some application.

Sorry.

> 2) Will it be supported on a target device such as the HTC G1 when it
> is
>    lauched to the market soon.

No, it is not supported in 1.0.
Reply all
Reply to author
Forward
0 new messages