tags:

views:

86

answers:

4

I have some Java user interface controls that I want to host in my .NET application as I can't afford to rewrite them. How can I do that? Do I need to wrap them up in COM? How do I do that? I want the component to sit on a form with other components written in .NET.

A: 

There's no way to force this high level of integration; you cannot make a .NET form host a Java component. Even COM wrapping wouldn't get you the level of integration necessary to host the component in the form.

McWafflestix
+1  A: 

If you're using VS2005, have you considered compiling said Java component in J#?

I've never tried J#, but I seem to recall Microsoft claiming that it would convert Swing calls to their WinForms equivalent.

R. Bemrose
This was also my initial reaction, but J# has been discontinued, although MS say they will support existing customers (VS2005) until 2015. (http://msdn.microsoft.com/en-us/vjsharp/default.aspx).
Mike Houston
A: 

Conceptually I find it almost impossible to believe that it is possible to do this.

However, you might try migrating the existing components to J#.

Yishai
A: 

There's a product called JNBridge that claims to do this - I've never heard of it before.

See also, this previous post.

Mike Houston