JAVAFX on ANDROID

Niklas Therning niklas at therning.org
Mon Oct 14 00:25:52 PDT 2013


I don't think a Java6 backport is necessary. If the jfx78 backport works on
RoboVM it should work on Android (provided that the native stuff is there
of course). The problem is the dx tool which doesn't accept Java7 .class
files, right?

IIUC not much happened to the class file format between Java6 and Java7
(except for invokedynamic and what is need to support it but Java7's javac
never generates invokedynamic ops). The APIs to support try-with-resources
(AutoCloseable) is already in Android and the syntactic sugar added in
Java7 (multi-catch, switch on string, diamond, etc) compiles to Java6
compatible bytecode and uses no new APIs. So it should be easy to make a
tool using ASM or similar which takes the jfx78 jar file and rewrites the
.class files in it to target 1.6 instead of 1.7 and repackage as a new jar.

Just my €0.02. If you want to maintain a backport of the backport :-) then
go for it.


On Mon, Oct 14, 2013 at 8:53 AM, Matthias Hänel <haenel at ultramixer.com>wrote:

> Hi Stefan,
>
>
> thanks for your fast answer.
>
>
> Am 12.10.2013 um 00:47 schrieb Stefan Fuchs <snfuchs at gmx.de>:
>
> > I think you must |add the flag ||-PCOMPILE_PANGO=true to build the new
> opensource font stuff.
>
> I am sure that's not that easy ;)
> Actually, I tried it but it didn't do anything in the first place.
>
>
> > If I remember correctly I got a similar error, when I first build jfx78
> on linux.
> >
> > I made some experiments with javafx on android by myself.
> >
> > I found the following interesting read:
> >
> http://stackoverflow.com/questions/7153989/java-7-language-features-with-android
>
> Well, I didn't use jfx78 vanilla, I used it as a base for the port to
> java6.
> I am quite sure that we need a java6 port on the long run to support
> davlik stable.
>
>
> > One other problem I hit, when trying to compile a larger application was:
> >
> http://stackoverflow.com/questions/15508477/android-my-application-is-too-large-and-gives-unable-to-execute-dex-method-id
>
> Ok, interessting, I'll take a look at it when I hit the error.
>
>
> > Apparently there is a limit of ||65536 methods per apk file.
> >
> >
> > Besides, I'm currently two releases behind with the jfx78.
> >
> > I'll try to catch up soon.
>
> It would be great to read your findings.
>
>
> kind regards
> Matthias
>
>
>
>


More information about the openjfx-dev mailing list