This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Kawa on Android - problems with kawa.standard.Scheme
On 03/01/2011 11:04 AM, Peter Feigl wrote:
On Mon, Feb 28, 2011 at 11:20:29AM -0800, Per Bothner wrote:
It's possible (in fact likely) the problem isn't the actual Path,
but one of the classes referenced by Path.
I think I found the problem, the reason for the crash is twofold:
- The class javax.tools.FileObject does not exist on Android.
That doesn't explain the problem. If you followed the instructions
(either using configure+make or ant) it is supposed to do an implicit
'make select-android' which runs a pre-processor (java.kawa.util.PreProcess)
which comments out the 'implements javax.tools.FileObject'. There
are no other references to FileObject in the code.
This can be fixed by commenting out line 13 in Path.java or probably
also by correctly setting --with-java-source=5 for ./configure
That's a useful data-point, but we still don't know what causes the
failure. I'll do some more experiments.
- The three static fields makePathProc, makeFilepathProc and
makeURIProc in LangObjType.java throw exceptions in their
initializers. If all three of them are set to = null (instead of new
PrimProcedure(..)), the class can successfully be loaded.
I am not sure on how to fix the second problem permanently, I tried
initializing the fields lazily in the constructor of LangObjType, but
that also raises an exception. It seems there's a general problem with
PrimProcedure.
It might be better if PrimProcedure were lazy - i.e. only do the
reflection when needed. Still, I though it should work anyway.
Perhaps I'm wrong - Android may not support the necessary reflection.
--
--Per Bothner
per@bothner.com http://per.bothner.com/