|
Authored by: Anonymous on Thursday, April 19 2012 @ 09:57 AM EDT |
N/t [ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Thursday, April 19 2012 @ 10:03 AM EDT |
It doesn't need to implement all correct java and APIs in
order to compile. It has its own SDK and compiler which will
not compile code from general java APIs unless it happens to
be in the Android APIs.
You can't (for example) compile AWT or Swing code into an
android project, or any of the other APIs that Android
doesn't support.
Similarly you can't compile an android application into a
java application unless you also implement the Android APIs.
They use the java syntax, and some APIs for familiarity and
ease of learning, but this isn't Java(tm), and it doesn't
aim to be.
[ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Thursday, April 19 2012 @ 11:32 AM EDT |
You write Java source, with some of your source code referring to android class
libraries.
Then you compile your source code with a Java compiler.
So only Java needs to be compatible with J2SE
Then magic happens.
Then you have an Android package.
Android does not need to be compatible with Java.
By implementing a few Java Language classes such as Object, Class, String and so
forth in the Dalvik VM...
Java Language becomes compatible with Android.
How cool is that?
Compatibility does not have to be a two way street
32 Bit x86 code will run on on AMD64 without penalty/compatibility issue,
because AMD64 includes a fully implemented set of 32bit x86 instructions in
hardware
The reverse is not true.
It can be done, just as I am sure that if enough effort is made you could run an
actual JVM on Android so that programs written to the J2xE API and compiled with
a J2xE compliant compiler could run on an Android Platform.
Google don't give a hoot about that any more than AMD give a hoot that 64Bit
binary instruction code will fail on a 32bit X86 processor, that's Oracles
problem, they are the custodians of the J2xE,
Android has an implementation of the core Java language components necessary for
language compatibility, yes Google copied some names from the Java Language,
they admitted it, but those names are not protected, the Judge said so.
Android is not Java, it does not call itself Java, it does not need to be J2xE
API compatible. It does not need javax.swing, It does not need org.OMG, it
doesn't use a coffee cup logo, it doesn't need to pass the TCK so it doesn't
need a license and who cares anyway.
The Java Language is free to use. Larry said so, last I heard.[ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Thursday, April 19 2012 @ 12:48 PM EDT |
Not if it is done to make porting easier. Back in the OS/2 days, IBM created
Open32 which was an implementation of the most commonly used Win32 APIs to make
porting to OS/2 easier. Of course, that later became part of the ODIN project
to allow unmodified Win32 apps to run on OS/2 which was later used as a basis
for Wine (and then Wine code went back into ODIN).[ Reply to This | Parent | # ]
|
|
Authored by: Wol on Thursday, April 19 2012 @ 07:25 PM EDT |
As far as I am aware, Dalvik EXplicitly says certain api's are not supported. If
you use those api's, then the Dalvik compiler will fail when run over the Java
byte code.
Fair dos - the Dalvik spec explicitly tells you what to expect ...
Cheers,
Wol[ Reply to This | Parent | # ]
|
|
|
|
|