<s>
This	O
article	O
compares	O
the	O
application	B-Application
programming	I-Application
interfaces	I-Application
(	O
APIs	B-Application
)	O
and	O
virtual	B-Architecture
machines	I-Architecture
(	O
VMs	O
)	O
of	O
the	O
programming	O
language	O
Java	B-Language
and	O
operating	O
system	O
Android	B-Application
.	O
</s>
<s>
While	O
most	O
Android	B-Application
applications	I-Application
are	O
written	O
in	O
Java-like	O
language	O
,	O
there	O
are	O
some	O
differences	O
between	O
the	O
Java	B-Language
API	B-Application
and	O
the	O
Android	B-Application
API	B-Application
,	O
and	O
Android	B-Application
does	O
not	O
run	O
Java	B-Language
bytecode	I-Language
by	O
a	O
traditional	O
Java	B-Language
virtual	I-Language
machine	I-Language
(	O
JVM	B-Language
)	O
,	O
but	O
instead	O
by	O
a	O
Dalvik	B-Application
virtual	I-Application
machine	I-Application
in	O
older	O
versions	O
of	O
Android	B-Application
,	O
and	O
an	O
Android	B-Application
Runtime	I-Application
(	O
ART	O
)	O
in	O
newer	O
versions	O
,	O
that	O
compile	O
the	O
same	O
code	O
that	O
Dalvik	B-Application
runs	O
to	O
Executable	O
and	O
Linkable	O
Format	O
(	O
ELF	O
)	O
executables	O
containing	O
machine	B-Language
code	I-Language
.	O
</s>
<s>
Java	B-Language
bytecode	I-Language
in	O
Java	B-Language
Archive	I-Language
(	O
JAR	B-Language
)	O
files	O
is	O
not	O
executed	O
by	O
Android	B-Application
devices	O
.	O
</s>
<s>
Instead	O
,	O
Java	B-Language
classes	O
are	O
compiled	O
into	O
a	O
proprietary	O
bytecode	O
format	O
and	O
run	O
on	O
Dalvik	B-Application
(	O
or	O
compiled	O
version	O
thereof	O
with	O
newer	O
ART	O
)	O
,	O
a	O
specialized	O
virtual	B-Architecture
machine	I-Architecture
(	O
VM	O
)	O
designed	O
for	O
Android	B-Application
.	O
</s>
<s>
Unlike	O
Java	B-Language
VMs	I-Language
,	O
which	O
are	O
stack	B-Application
machines	I-Application
(	O
stack-based	O
architecture	O
)	O
,	O
the	O
Dalvik	B-Application
VM	I-Application
is	O
a	O
register	B-Application
machine	I-Application
(	O
register-based	O
architecture	O
)	O
.	O
</s>
<s>
Dalvik	B-Application
has	O
some	O
traits	O
that	O
differentiate	O
it	O
from	O
other	O
standard	O
VMs	O
:	O
</s>
<s>
The	O
constant	O
pool	O
has	O
been	O
modified	O
to	O
use	O
only	O
32-bit	O
indexes	O
to	O
simplify	O
the	O
interpreter	B-Application
.	O
</s>
<s>
Standard	O
Java	B-Language
bytecode	I-Language
executes	O
8-bit	O
stack	O
instructions	O
.	O
</s>
<s>
Dalvik	B-Application
instead	O
uses	O
its	O
own	O
16-bit	O
instruction	O
set	O
that	O
works	O
directly	O
on	O
local	O
variables	O
.	O
</s>
<s>
Because	O
the	O
bytecode	O
loaded	O
by	O
the	O
Dalvik	B-Application
virtual	I-Application
machine	I-Application
is	O
not	O
Java	B-Language
bytecode	I-Language
and	O
due	O
to	O
the	O
way	O
Dalvik	B-Application
loads	O
classes	O
,	O
it	O
is	O
impossible	O
to	O
load	O
library	O
packages	O
as	O
jar	B-Language
files	I-Language
.	O
</s>
<s>
A	O
different	O
procedure	O
must	O
be	O
used	O
to	O
load	O
Android	B-Application
libraries	O
,	O
in	O
which	O
the	O
content	O
of	O
the	O
underlying	O
dex	B-Application
file	O
must	O
be	O
copied	O
in	O
the	O
application	O
private	O
internal	O
storage	O
area	O
before	O
it	O
is	O
loaded	O
.	O
</s>
<s>
As	O
is	O
the	O
case	O
for	O
the	O
Java	B-Language
SE	I-Language
class	O
,	O
the	O
Android	B-Application
class	O
allows	O
retrieving	O
system	O
properties	O
.	O
</s>
<s>
However	O
,	O
some	O
mandatory	O
properties	O
defined	O
with	O
the	O
Java	B-Language
virtual	I-Language
machine	I-Language
have	O
no	O
meaning	O
or	O
a	O
different	O
meaning	O
on	O
Android	B-Application
.	O
</s>
<s>
java.version	O
property	O
returns	O
0	O
because	O
it	O
is	O
not	O
used	O
on	O
Android	B-Application
.	O
</s>
<s>
java.specification.version	O
invariably	O
returns	O
0.9	O
independently	O
of	O
the	O
version	O
of	O
Android	B-Application
used	O
.	O
</s>
<s>
java.class.version	O
invariably	O
returns	O
50	O
independently	O
of	O
the	O
version	O
of	O
Android	B-Application
used	O
.	O
</s>
<s>
user.dir	O
has	O
a	O
different	O
meaning	O
on	O
Android	B-Application
.	O
</s>
<s>
user.home	O
and	O
user.name	O
properties	O
do	O
not	O
exist	O
on	O
Android	B-Application
.	O
</s>
<s>
Current	O
versions	O
of	O
Android	B-Application
use	O
the	O
latest	O
Java	B-Language
language	I-Language
and	O
its	O
libraries	O
(	O
but	O
not	O
full	O
graphical	B-Application
user	I-Application
interface	I-Application
(	O
GUI	B-Application
)	O
frameworks	O
)	O
,	O
not	O
the	O
Apache	B-Application
Harmony	I-Application
Java	B-Language
implementation	O
,	O
that	O
older	O
versions	O
used	O
.	O
</s>
<s>
Java	B-Language
8	O
source	O
code	O
that	O
works	O
in	O
latest	O
version	O
of	O
Android	B-Application
,	O
can	O
be	O
made	O
to	O
work	O
in	O
older	O
versions	O
of	O
Android	B-Application
.	O
</s>
<s>
This	O
has	O
changed	O
at	O
least	O
from	O
HoneyComb	B-Application
,	O
and	O
they	O
now	O
output	O
to	O
the	O
log	O
console	O
also	O
.	O
</s>
<s>
Android	B-Application
does	O
not	O
use	O
the	O
Abstract	B-Language
Window	I-Language
Toolkit	I-Language
nor	O
the	O
Swing	B-Language
library	O
.	O
</s>
<s>
User	B-Application
interfaces	I-Application
are	O
built	O
using	O
View	O
objects	O
.	O
</s>
<s>
Android	B-Application
uses	O
a	O
framework	O
similar	O
to	O
Swing	B-Language
,	O
based	O
on	O
s	O
rather	O
than	O
s	O
.	O
However	O
,	O
Android	B-Application
widgets	O
are	O
not	O
JavaBeans	O
:	O
the	O
Android	B-Application
application	I-Application
must	O
be	O
provided	O
to	O
the	O
widget	O
at	O
creation	O
.	O
</s>
<s>
Android	B-Application
widget	O
library	O
does	O
not	O
support	O
a	O
pluggable	B-Language
look	I-Language
and	I-Language
feel	I-Language
architecture	O
.	O
</s>
<s>
The	O
look	O
and	O
feel	O
of	O
Android	B-Application
widgets	O
must	O
be	O
embedded	O
in	O
the	O
widgets	O
.	O
</s>
<s>
Contrary	O
to	O
Swing	B-Language
where	O
layout	B-Library
managers	I-Library
can	O
be	O
applied	O
to	O
any	O
container	B-Application
widget	I-Application
,	O
Android	B-Application
layout	O
behavior	O
is	O
encoded	O
in	O
the	O
containers	B-Application
.	O
</s>
<s>
Android	B-Application
includes	O
only	O
a	O
small	O
subset	O
of	O
the	O
java.beans	O
package	O
(	O
and	O
related	O
classes	O
)	O
.	O
</s>
