|
Authored by: Chromatix on Friday, May 25 2012 @ 03:43 PM EDT |
IIRC, javac doesn't care about entry points. It will happily compile a Java
program containing multiple entry points or none at all.
A program written
in Java language, using only the common APIs between Java
SE and Android, and
providing both entry points required by each runtime
environment (essentially
an API provided by the program to the runtime), will run
correctly on both
platforms.
You have to pay attention to achieve that, but it's not at all
difficult. [ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Friday, May 25 2012 @ 03:59 PM EDT |
Back in the OS/2 days, IBM did the same thing to make it easier for developers
to port Win32 (95/NT) applications to OS/2 by implementing the most commonly
used Win32 APIs which allowed about 90-95% of existing Win32 code to be used
as-is. That code would later be used by Wine and Odin (Wine for OS/2) which
helped considerably. Oh, and IBM only had a license for Win16 code (Win-OS/2),
not Windows 9x/NT.[ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Friday, May 25 2012 @ 11:59 PM EDT |
The Sony BIOS that Connectrix made a re-implementation of was not a
device,
either.
It was a piece of software that was part of a platform (the Sony
PlayStation) for running other software (PlayStation games). It contained
APIs for functions meant to be used by those games. Connectrix
reverse-engineered the Sony BIOS to learn the ideas and the functional
requirements of those APIs, and then wrote--from
scratch--their own
implementation of a compatible replacement for that BIOS, which
necessarily
implemented the same APIs. But not all of them: they only
implemented some of
the
API functions, the ones which they deemed useful for their compatibility
goals. They did this to
make their own "VGS" platform which was "compatible"
in the sense that
it could run PlayStation games.
It compares nicely to
this case: The 51 packages are part of a piece of
software (Oracle's Java
class library) which is part of a platform (Java 2
Standard Edition) for
running other software (applications written in Java).
Apache Harmony
collected info on the APIs and then wrote--from
scratch--their own compatible
implementation, which necessarily
implemented the
same APIs. Google then took
Apache Harmony's new implementation
and made it part of Android, so it would
have compatible APIs. But they
didn't provide reimplementations of all of the
packages from the J2SE
platform, only the ones which
they deemed useful for
their compatibility goals.
Connectrix needed 100% binary compatibility for
any APIs actually used
by a PlayStation game. But Android doesn't need that.
It just needed
source-level (and .class-level) API compatibility for the
functionality that
was common to both platforms. Because that would make it
much easier
for programmers to use their API knowledge, and existing Java code,
on
Android. And because the common APIs would enhance the value (to
programmers, and indirectly to users) of *both* platforms. [ Reply to This | Parent | # ]
|
|
|
|
|