1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
4
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>IKVM.NET User's Guide</title>
6
<link type="text/css" href="../skin/page.css" rel="stylesheet">
8
<body text="#000000" bgcolor="#FFFFFF">
9
<!--================= start Navigation Path ==================-->
10
<table summary="navigation path" width="100%" border="0" cellpadding="0" cellspacing="0">
12
<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font size="2" face="Arial, Helvetica, Sans-serif"><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td>
15
<td bgcolor="#4C6C8F" height="2"><img height="2" width="2" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
18
<!--================= end Navigation Path ==================-->
19
<!--================= start Banner ==================-->
20
<table summary="header with logos" width="100%" border="0" cellpadding="0" cellspacing="0">
22
<!--================= start Group Logo ==================-->
23
<td bgcolor="#294563"></td>
24
<!--================= end Group Logo ==================-->
25
<!--================= start Project Logo ==================--><td width="100%" align="center" bgcolor="#294563"><a href="http://www.ikvm.net/"><img border="0" class="logoImage" alt="IKVM.NET" src="../images/project.gif" title="Java on .NET"></a></td>
26
<!--================= end Project Logo ==================-->
27
<!--================= start Search ==================--><td valign="top" rowspan="2" bgcolor="#294563"></td>
28
<!--================= start Search ==================--><td bgcolor="#294563"><img height="10" width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
31
<td valign="bottom" bgcolor="#294563" colspan="2">
32
<!--================= start Tabs ==================-->
34
<table summary="tab bar" border="0" cellpadding="0" cellspacing="0">
36
<td width="6"><img alt="" height="8" width="6" src="../skin/images/spacer.gif"></td>
40
<!--================= end Tabs ==================-->
41
</td><td bgcolor="#294563"><img alt="" width="1" height="1" src="../skin/images/spacer.gif" class="spacer"></td>
44
<td bgcolor="#4C6C8F" colspan="4"><img width="1" height="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
47
<!--================= end Banner ==================-->
48
<!--================= start Menu, NavBar, Content ==================-->
49
<table summary="page content" bgcolor="#ffffff" width="100%" border="0" cellpadding="0" cellspacing="0">
52
<table summary="menu" border="0" cellspacing="0" cellpadding="0">
54
<!--================= start left top NavBar ==================-->
55
<td rowspan="3" valign="top">
56
<table summary="blue line" border="0" cellpadding="0" cellspacing="0">
58
<td bgcolor="#294563"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
61
<td bgcolor="#CFDCED"><font color="#4C6C8F" size="4" face="Arial, Helvetica, Sans-serif"> </font></td>
64
<td bgcolor="#294563"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
68
<!--================= end left top NavBar ==================--><td bgcolor="#294563"><img width="1" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td valign="bottom" bgcolor="#4C6C8F"><img width="10" height="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap" valign="top" bgcolor="#4C6C8F">
69
<!--================= start Menu items ==================-->
73
<font color="#CFDCED">About</font>
77
<a href="../index.html" title="">Home</a>
81
<a href="../download.html" title="">Download</a>
85
<a href="../uses.html" title="">Uses</a>
89
<a href="http://weblog.ikvm.net" title="">News</a>
93
<a href="http://weblog.ikvm.net/story.aspx/faq" title="">FAQ</a>
97
<a href="http://weblog.ikvm.net/story.aspx/license" title="">License</a>
101
<a href="../stories.html" title="">Case Studies</a>
107
<font color="#CFDCED">User's Guide</font>
111
<span class="sel"><font color="#ffcc00">Introduction</font></span>
115
<a href="../userguide/install.html" title="">Installation</a>
119
<a href="../userguide/tutorial.html" title="">Tutorial</a>
123
<a href="../userguide/tools.html" title="">Tools Reference</a>
132
<font color="#CFDCED">Developer's Guide</font>
136
<a href="../devguide/intro.html" title="">Introduction</a>
140
<a href="../devguide/concepts.html" title="">Concepts</a>
144
<a href="../devguide/net2java.html" title="">Using Java Libraries</a>
148
<a href="../devguide/java2net.html" title="">Developing in Java</a>
154
<font color="#CFDCED">Contributing</font>
158
<a href="http://sourceforge.net/mail/?group_id=69637">Mailing Lists</a>
162
<a href="http://sourceforge.net/tracker/?group_id=69637">Report Bugs</a>
166
<a href="http://sourceforge.net/cvs/?group_id=69637">CVS Repository</a>
173
<!--================= end Menu items ==================-->
174
</td><td valign="bottom" bgcolor="#4C6C8F"><img width="10" height="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td bgcolor="#294563"><img width="1" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
177
<td valign="bottom" align="left" colspan="2" rowspan="2" bgcolor="#4C6C8F"><img height="10" width="10" border="0" alt="" src="../skin/images/menu-left.gif"></td><td bgcolor="#4C6C8F"><img height="10" width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td valign="bottom" align="right" colspan="2" rowspan="2" bgcolor="#4C6C8F"><img height="10" width="10" border="0" alt="" src="../skin/images/menu-right.gif"></td>
180
<td height="1" bgcolor="#294563"><img width="1" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
183
</td><td valign="top" width="100%">
184
<table summary="content" width="100%" border="0" cellpadding="0" cellspacing="0">
185
<!--================= start middle NavBar ==================-->
187
<td colspan="4" bgcolor="#294563"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
190
<td align="left" width="10" bgcolor="#CFDCED"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td align="left" width="50%" bgcolor="#CFDCED"><font color="#4C6C8F" size="3" face="Arial, Helvetica, Sans-serif">
193
</font><img width="10" height="8" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td align="right" width="50%" bgcolor="#CFDCED"><font color="#4C6C8F" size="3" face="Arial, Helvetica, Sans-serif">
196
</font><img width="10" height="8" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td width="10" bgcolor="#CFDCED"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
199
<td colspan="4" bgcolor="#294563"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
201
<!--================= end middle NavBar ==================-->
202
<!--================= start Content==================-->
204
<td align="left" width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" align="left" width="100%">
205
<div xmlns:xhtml="http://www.w3.org/1999/xhtml" class="content">
206
<table class="title" summary="">
209
<h1>IKVM.NET User's Guide</h1>
215
<a href="#Introduction">Introduction</a>
218
<a href="#Overview">Overview</a>
221
<a href="#System+Requirements">System Requirements</a>
225
<a name="N10016"></a><a name="Introduction"></a>
226
<h3>Introduction</h3>
227
<div style="margin-left: 0 ; border: 2px">
228
<p>IKVM.NET is a Java Virtual Machine (JVM) for the .NET and Mono runtimes. At a time when most people in the computer industry consider Java and
229
.NET as mutually exclusive technologies, IKVM.NET stands in the unique position of bringing them together.
230
Initially born out of frustration with the limitations of tools like JUMP and J#, IKVM.NET was created when Jeroen Frijters set out to
231
create a way to migrate an existing Java<sup>TM</sup> database application
232
to .NET<sup>TM</sup>.
234
<p>IKVM.NET has gone through a variety of designs and name changes to emerge as a sophisticated collection of tools offering a variety of integration patterns
235
between the Java and .NET languages and platforms. It is still under development but people have reported success in running sophisticated applications and tools
236
including Eclipse, JmDNS, JGroups, Jetty (with a few changes), etc.
238
<p>This manual is written for IKVM.NET version 0.36. </p>
242
<a name="N1002C"></a><a name="Overview"></a>
244
<div style="margin-left: 0 ; border: 2px">
245
<p>There are two main ways of using IKVM.NET:</p>
250
<p>Dynamically: In this mode, Java classes and jars are used directly to execute Java applications on the .NET<sup>TM</sup> runtime.
251
Java bytecode is translated on the fly into CIL and no further steps are necessary. The full Java class loader model is supported in this mode.</p>
257
<p>Statically: In order to allow Java code to be used by .NET applications, it must be compiled down to a DLL and used directly.
258
The bytecode is translated to CIL and stored in this form. The assemblies can be referenced directly by the .NET applications and
259
the "Java" objects can be used as if they were .NET objects. While the static mode does not support the full Java class loader mechanism,
260
it is possible for statically-compiled code to create a class loader and load classes dynamically.
267
IKVM.NET provides the VM-related technologies for byte-code translation and verification, classloading, etc.
268
It is dependent upon the <a target="_blank" href="http://openjdk.java.net/">OpenJDK</a> project
269
for implementations of the JDK libraries.</p>
270
<p>IKVM.NET is comprised by the following components:</p>
271
<table class="ForrestTable" cellspacing="1" cellpadding="4">
272
<caption>IKVM.NET Components</caption>
276
<th colspan="1" rowspan="1">Component</th>
277
<th colspan="1" rowspan="1">Description</th>
283
<td colspan="1" rowspan="1">IKVM.Runtime.dll</td>
284
<td colspan="1" rowspan="1">The VM runtime and all supporting code. It contains (among other things):
289
Byte Code JIT compiler/verifier: Just-in-time compiles Java Byte Code to CIL.</p>
295
Object model remapping infrastructure: Makes System.Object, System.String and System.Exception appear to Java code as java.lang.Object, java.lang.String and java.lang.Throwable.</p>
301
Managed .NET re-implementations of the native methods in Classpath.</p>
313
<td colspan="1" rowspan="1">IKVM.OpenJDK.ClassLibrary.dll</td>
314
<td colspan="1" rowspan="1">This is a compiled version of the Java class libraries, plus some additional IKVM.NET specific code.</td>
320
<td colspan="1" rowspan="1">IKVM.AWT.WinForms.dll</td>
321
<td colspan="1" rowspan="1">Very limited and broken implementation of a few AWT peers. This is a low priority issue until the platform stabilizes and works sufficiently well.</td>
327
<td colspan="1" rowspan="1">ikvm.exe</td>
328
<td colspan="1" rowspan="1">Starter executable, comparable to java.exe ("dynamic mode").</td>
334
<td colspan="1" rowspan="1">ikvmc.exe</td>
335
<td colspan="1" rowspan="1">Static compiler. Used to compile Java classes and jars into a .NET assembly ("static mode")</td>
341
<td colspan="1" rowspan="1">ikvmstub.exe</td>
342
<td colspan="1" rowspan="1">A tool that generates stub class files from a .NET assembly, so that Java code can be compiled against .NET code. IKVM.NET understands the stubs and replaces the references to the stubs by references to the actual .NET types.</td>
351
<a name="N100C4"></a><a name="System+Requirements"></a>
352
<h3>System Requirements</h3>
353
<div style="margin-left: 0 ; border: 2px">
354
<p>You must have one of the following .NET frameworks
358
<li>Microsoft .NET Framework 1.1 (or later) SDK (Windows platform)</li>
360
<li>Mono 1.2 (or later) (Windows or Linux)</li>
367
<div class="attribution">by Stephen Schaub, Brian J. Sletten</div>
369
</td><td width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
371
<!--================= end Content==================-->
376
<!--================= end Menu, NavBar, Content ==================-->
377
<!--================= start Footer ==================-->
378
<table summary="footer" cellspacing="0" cellpadding="0" width="100%" border="0">
380
<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"><a href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a href="../skin/images/chapter.gif"></a><a href="../skin/images/chapter_open.gif"></a><a href="../skin/images/current.gif"></a><a href="/favicon.ico"></a></td>
383
<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif">
385
Send feedback about this page to <a href="mailto:webmaster@ikvm.net?subject=IKVM Website Feedback - Page userguide/intro.html">webmaster@ikvm.net</a>
389
2008 Jeroen Frijters All rights reserved.<script type="text/javascript" language="JavaScript"><!--
390
document.write(" - "+"Last Published: " + document.lastModified);
391
// --></script></font></td>
394
<td colspan="2" align="left" bgcolor="#CFDCED" class="logos"></td>
397
<!--================= end Footer ==================-->