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
2009-06-16 17:25:08
+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
2009-06-16 17:28:04
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
2009-06-16 17:32:45
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
2009-06-16 17:29:14
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
2009-06-16 17:31:19