Hi guys,
I meet a problem when using jar files, I simplify my question by
below examples:
test.jar include a class of "com.example.test.class"
eclipse project A using test.jar and declare test1 extend from
com.example.test
eclipse project B using test.jar too and declare test2 extend from
com.example.test
Both project build sucessfull.
Then I try to using reflection in project B to instaniance a
instance of test1
Class <?> c = tmpCtxt.getClassLoader().loadClass
("com.example.A.test1");
test tmp = (test) c.newInstance() //
it throw java.lang.ClassCastException. (but if I put
com.example.test.class into frameworks/base", it's OK)
Anyidea about this issue?
Any advice is appreciated.
Regards,
Jove
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---