Skip Links

Using open source to integrate Java into .NET apps

Dr. Internet By Steve Blass, Network World
March 01, 2007 07:10 PM ET
Steve Blass
  • Print

How can I integrate my existing Java library into a Java software library from a C# .Net program?

The IKVM.Net software tools provide an implementation of Java for the Microsoft .Net framework. IKVM provides a Java Virtual Machine (JVM) and a Java byte-code translator, ikvmc. Used in place of the normal Java command, the IKVM JVM runs Java applications and applets dynamically. The ikvmc translator converts Java applications and libraries into .Net executable programs and Dynamic Link Library (DLL) files. The software is available from Sourceforge through the download link at www.ikvm.net. To install it, unzip the download archive, add the program location to the system PATH and copy the IKVM DLL files into the .Net global assembly cache. Use the .Net framework configuration program in the Windows control panel to copy DLL files to the .Net global assembly cache. After the software is installed, use ikvmc to convert Java jar files or class files into .Net applications or libraries. Applications created this way will run natively under Windows, and library functions can be called directly from inside .Net programs. You can develop .Net software in Java with IKVM tools by creating jar files with the ikvmstub program, providing Java programming interface calls into .Net libraries, compiling your Java program together with the library stub(s) and converting the resulting Java classes into the final .Net program using ikvmc.

Blass is an IT manager in Phoenix; he can be reached at dr.internet@jschnee.com.

Read more about software in Network World's Software section.

  • Print
What is Tech Briefcase?
TechBriefcase is a new, free service where IT Professionals can Search, Store and Share IT white papers and content like this. Learn more
Bookmark content
Speed up your research efforts with content across the web.
Search and Store
Find the white papers you need. Create folders for any topic.
View Anywhere
Open your briefcase on your iPhone, tablet or desktop. Share with colleagues.
Don't have an account yet?

Videos

rssRss Feed