<s>
Java	B-Library
AWT	I-Library
Native	I-Library
Interface	I-Library
(	O
jawt	B-Library
)	O
is	O
an	O
interface	O
for	O
the	O
Java	B-Language
programming	I-Language
language	I-Language
that	O
enables	O
rendering	O
libraries	B-Library
compiled	O
to	O
native	B-Language
code	I-Language
to	O
draw	O
directly	O
to	O
a	O
Java	B-Device
Abstract	B-Language
Window	I-Language
Toolkit	I-Language
(	O
AWT	O
)	O
object	O
drawing	O
surface	O
.	O
</s>
<s>
The	O
Java	B-Language
Native	I-Language
Interface	I-Language
(	O
JNI	B-Language
)	O
allows	O
developers	O
to	O
add	O
platform-dependent	O
functionality	O
to	O
Java	B-Device
applications	B-Application
.	O
</s>
<s>
The	O
JNI	B-Language
enables	O
developers	O
to	O
add	O
time-critical	O
operations	O
like	O
mathematical	O
calculations	O
and	O
3D	O
rendering	O
.	O
</s>
<s>
Previously	O
,	O
native	O
3D	O
rendering	O
was	O
technically	O
challenging	O
because	O
the	O
native	B-Language
code	I-Language
did	O
n't	O
have	O
access	O
to	O
the	O
graphic	O
context	O
.	O
</s>
<s>
The	O
AWT	B-Library
Native	I-Library
Interface	I-Library
is	O
designed	O
to	O
give	O
developers	O
access	O
to	O
an	O
AWT	O
Canvas	O
for	O
direct	O
drawing	O
with	O
native	B-Language
code	I-Language
.	O
</s>
<s>
In	O
fact	O
,	O
the	O
Java	B-Language
3D	I-Language
API	O
extension	O
to	O
the	O
standard	O
Java	B-Language
SE	I-Language
JDK	B-Language
relies	O
heavily	O
on	O
the	O
AWT	B-Library
Native	I-Library
Interface	I-Library
to	O
render	O
3D	O
objects	O
in	O
Java	B-Device
.	O
</s>
<s>
The	O
AWT	B-Library
Native	I-Library
Interface	I-Library
is	O
very	O
similar	O
to	O
the	O
JNI	B-Language
,	O
and	O
,	O
the	O
steps	O
are	O
,	O
in	O
fact	O
,	O
the	O
same	O
as	O
those	O
of	O
the	O
JNI	B-Language
.	O
</s>
<s>
See	O
the	O
Java	B-Language
Native	I-Language
Interface	I-Language
article	O
for	O
an	O
explanation	O
of	O
the	O
JNI	B-Language
techniques	O
employed	O
by	O
the	O
AWT	B-Library
Native	I-Library
Interface	I-Library
.	O
</s>
<s>
The	O
AWT	B-Library
Native	I-Library
Interface	I-Library
was	O
added	O
to	O
the	O
Java	B-Device
platform	I-Device
with	O
the	O
J2SE	B-Language
1.3	O
(	O
"	O
Kestrel	O
"	O
)	O
version	O
.	O
</s>
<s>
See	O
the	O
Java	B-Language
Native	I-Language
Interface	I-Language
article	O
for	O
an	O
explanation	O
of	O
the	O
native	O
keyword	O
and	O
the	O
loadLibrary( )	O
method	O
.	O
</s>
<s>
A	O
paint( )	O
method	O
will	O
be	O
simply	O
invoked	O
when	O
the	O
AWT	O
event	B-Language
dispatching	I-Language
thread	I-Language
"	O
repaints	O
"	O
the	O
screen	O
.	O
</s>
<s>
Create	O
the	O
C++	B-Language
header	B-Language
file	I-Language
as	O
usual	O
.	O
</s>
<s>
(	O
See	O
Java	B-Language
Native	I-Language
Interface	I-Language
for	O
more	O
complete	O
explanations	O
.	O
)	O
</s>
<s>
See	O
Java	B-Language
Native	I-Language
Interface	I-Language
(	O
JNI	B-Language
)	O
for	O
a	O
more	O
complete	O
explanation	O
.	O
</s>
<s>
(	O
For	O
Solaris	B-Application
code	O
and	O
other	O
operating	B-General_Concept
systems	I-General_Concept
see	O
links	O
below	O
.	O
)	O
</s>
<s>
(	O
See	O
Java	B-Language
Native	I-Language
Interface	I-Language
for	O
complete	O
instructions	O
.	O
)	O
</s>
<s>
Note	O
:	O
One	O
can	O
notice	O
that	O
the	O
AWT	B-Library
Native	I-Library
Interface	I-Library
requires	O
the	O
"	O
jawt.dll	O
"	O
(	O
or	O
"	O
jawt.so	O
 "	O
)	O
to	O
run	O
with	O
the	O
application	O
,	O
so	O
the	O
easiest	O
way	O
to	O
do	O
that	O
is	O
copying	O
the	O
"	O
jawt.dll	O
"	O
.	O
</s>
<s>
(	O
should	O
be	O
in	O
the	O
.../jre/bin	O
file	B-Application
path	I-Application
of	O
the	O
JDK	B-Language
's	O
installation	O
path	O
.	O
)	O
</s>
<s>
In	O
Windows	B-Application
,	O
the	O
JVM	O
will	O
pass	O
a	O
HWND	O
and	O
other	O
window	O
information	O
to	O
the	O
native	O
application	O
so	O
that	O
the	O
application	O
will	O
"	O
know	O
"	O
where	O
to	O
draw	O
.	O
</s>
<s>
The	O
window	O
information	O
the	O
native	O
side	O
needs	O
will	O
be	O
in	O
a	O
JAWT_Win32DrawingSurfaceInfo	O
structure	O
(	O
depending	O
on	O
Operating	B-General_Concept
System	I-General_Concept
)	O
which	O
can	O
be	O
retrieved	O
with	O
this	O
line	O
:	O
</s>
