OpenJDK on Android

Mario Torre neugens.limasoftware at
Wed Nov 14 10:57:50 UTC 2012

In fact, it's not even that difficult.

Android is basically Linux, you would need to replace the graphics stack
(Cacio to the rescue!) and do some minor fix here and there.

Last year at FOSDEM Xerxes Randby demoed NetBeans on a Nokia phone, I would
expect an Android port to be very similar.

For this to work, you likely need a rooted device though.

An alternative would be to add Swing support to the core Android, you
should be able to reuse most of the OpenJDK or Classpath code for that (I
did something similar once, it's not so much work as it seems), and this is
the approach taken by most companies to offer Java ME compatibility.

Finally, you can do something like our WebJDK (part of Caciocavallo again),
and render stuff into an HTML 5 container (we tested this on Android 2.2,
so any new Android is far better).

To be honest, the likely reason nobody tried those things *for real* is
that I don't think it really makes much sense to run desktop applications
on such small devices (even if they are actually capable of doing so).

The embedded world is full of custom solutions and those will keep existing
for year, in my eyes those are the ones that would benefit for such a port
to exist, but it's usually all about specialized applications that run in
very specific and controlled environments. Those are mostly covered already
(embedded Linux, Maemo, and so on, but also Window CE and QNX, VXWorks,
OS9, just to name a few, there is really no lack of Hardware and Software,
and they cost less than an Android phone) and probably moving those
programs (even if they could work directly) is usually very expensive
(beside, there may be support issues here, which is at times more important
than the flexibility to chose the Hardware/Software platform).

Writing full applications for Android (or iOS for that matter) is usually a
simpler task than doing a port of existing code, and perform better, and
now JavaFX is coming to a maturity, so also supporting this as a new cross
platform Toolkit is an option.

Probably this situation is going to change with ARM64 approaching, then I
see a scenario where the remote app with local HTML 5 rendering is in a
very good position, but so far it seems nobody is really interested in
investing any money to make those port a reality.

Overall, I'm not an analyst so what I wrote may be completely untrue, but I
guess this kind of things are really dedicated to a very small niche market.

This is a possible explanation of the "why nobody is doing it" question you
asked, but again, I may be completely off here :)


2012/11/14 Andrew Haley <aph at>

> On 11/13/2012 10:03 PM, Fernando Cassia wrote:
> > There are pretty good ARM ports of OpenJDK already, so what´s missing?.
> > What prevents someone from building "OpenJDK for Android/ARM" and
> offering
> > it for download so that those who want to run Java SE apps atop Android
> can
> > do it?.
> I don't know of any technical reason.  I don't know that anyone
> has tried.
> Andrew.

pgp key: PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Proud GNU Classpath developer:
Read About us at:

Please, support open standards:

More information about the discuss mailing list