~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/ikvm/website/src/documentation/content/xdocs/devguide/net2java.xml

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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">
 
3
<document> 
 
4
  <header> 
 
5
    <title>Using Java API's in .NET Applications</title> 
 
6
     <abstract>This section discusses information of interest to developers
 
7
       who want to use Java API's in their .NET applications. </abstract>
 
8
  </header> 
 
9
  <body> 
 
10
 
 
11
   <section>
 
12
      <title>Overview</title>
 
13
      
 
14
      <p>IKVM makes it possible to develop .NET applications that use Java API's. Here's how to proceed:</p>
 
15
      <ol>
 
16
        <li>IKVM comes with an implementation of the Java class libraries in .NET. To use those API's, simply add
 
17
        a reference to IKVM.OpenJDK.ClassLibrary.dll to your Mono / .NET IDE project. </li>
 
18
        <li>To use other Java API's, you can take one of the following approaches:
 
19
            <ul>
 
20
               <li>Convert the Java API to .NET CIL using <link href="ext:ikvmc">ikvmc</link>.
 
21
                       This produces a .NET dll that you can reference in your project. </li>
 
22
                <li>Use the Java reflection API's to dynamically load and execute the Java bytecode using the
 
23
                        IKVM bytecode interpreter.
 
24
                        For example, your application can load Java bytecode over a network connection
 
25
                        and execute it dynamically.</li>
 
26
            </ul>
 
27
        </li>
 
28
      </ol>
 
29
      
 
30
    </section>
 
31
 
 
32
    <section>
 
33
      <title>Java / .NET Interoperability Issues</title>
 
34
      
 
35
      <p>When calling Java API's from a .NET language such as C#, you will need to know 
 
36
      how to deal with the gap between the .NET and Java object models. For example, Java and .NET
 
37
      both have their own String class, primitive wrapper classes, exception hierarchy, and so on. 
 
38
      Eventually, that information will be included in this manual. For now, you can use the following
 
39
      as resources:</p>
 
40
      
 
41
      <ul>
 
42
        <li>The <link href="http://weblog.ikvm.net">IKVM WebLog</link> has several
 
43
          helpful entries. The series from February 29 - March 10 describe the object model.</li>
 
44
        <li>The hodgepodge sample in the <link href="site:download">sample distribution</link>
 
45
        is a simple demonstration of using Java API's from a C# application.</li>
 
46
        <li>The IKVM source code is the ultimate reference, of course. </li>
 
47
      </ul>
 
48
    </section>
 
49
    
 
50
    <section>
 
51
      <title>Subclassing Java Code</title>
 
52
      <p>See IKVM Weblog Article: March 9</p>
 
53
    </section>
 
54
    
 
55
  </body>
 
56
</document>