1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "http://apache.org/forrest/dtd/document-v12.dtd">
5
<title>IKVM.NET Concepts</title>
6
<authors><person name="Stephen Schaub" email="sschaub@bju.edu"/>
8
<abstract>This section discusses several important concepts about
9
the capabilities and limitations of IKVM.NET. </abstract>
13
<title>Class Loading</title>
15
<p>IKVM.NET fully supports dynamic Java class loading, both in Java applications running in the ikvm
16
JVM, as well as in Java applications which have been converted to .NET CIL using ikvmc.
20
<title>Class Loading in Dynamically Interpreted Java Applications</title>
21
<p>When you run a Java application using ikvm, ikvm finds and loads Java .class files much like
22
other Java VM's. See the <link href="ext:ikvm">ikvm notes</link> for details.</p>
26
<title>Class Loading in ikvmc-compiled Java Applications</title>
27
<p>When you convert a Java application to CIL using ikvmc, it executes as "native" .NET code. Each .NET assembly will have its own
28
Java class loader instance (typically of the type ikvm.runtime.AssemblyClassLoader). This class loader will load classes using the following algorithm:</p>
30
<li>The corresponding assembly is searched first. Thus, if the class exists in the assembly, it will be found there.</li>
31
<li>All assemblies directly referenced by corresponding assembly are searched.</li>
34
<p>For more details see these two articles: <link href="http://weblog.ikvm.net/PermaLink.aspx?guid=4e0b7f7c-6f5d-42a3-a4d6-5d05a99c84ff">Class Loading Architecture</link>, <link href="http://weblog.ikvm.net/PermaLink.aspx?guid=375f1ff8-912a-4458-9120-f0a8cfb23b68">Writing a Custom Assembly Class Loader</link></p>
41
<title>Debugging Support</title>
42
<p>Java applications converted to CIL using ikvmc with the -debug option can be debugged using standard .NET / Mono debugging
43
tools. Remember to compile the Java source code using the appropriate debug option (javac: -g or jikes: -g:lines,vars,source).</p>