Accessing Java code from .NET using COM
I have a Java library that I am trying to access from C# or VB7 through COM.
Microsoft's Java VM support for accessing Java classes as COM objects extend
to the .NET framwork? So far I have been unable to get this to work. I have
included the source for a very simple test case below. The Java code
implements a simple COM object which the C# code calls. In Visual Basic 6 I
can access the COM object fine. In C# or VB7 it works right up to when
the function is called at which time I get a "Not Implemented" exception.
Has anyone else been able to call Java code from a .NET language? Does
anyone know if this is supposed to work?
>>> Java code to display a dialog box (Project name COMTest1) :
public class Class1
public void showDialog()
com.ms.wfc.ui.MessageBox.show("I'm a Java COM object!", "COM");
>>> C# code that calls the showDialog() member of the Java COM object:
protected void button1_Click(object sender, System.EventArgs e)
z = new COMTest1.Class1();
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL