0 Replies Latest reply on Aug 11, 2010 2:26 AM by 843807

    trying to put java awt into c# app

      Hi, not sure if this is the place to post, mod please move it necessary...
      The problem here is that i am trying to put a java panel into a C# winform.
      I am using the IKVM to convert my java class to a dll and the C# program is referencing it.

      Here are the codes:
      for java:
      // JavaComponent.java
      import java.awt.*;
      import java.awt.event.*;
      public class JavaComponent extends Panel {
         public TextField javaTextBox;
         Button btn;
         public JavaComponent() {
            setSize(400, 100);
            setLayout(new GridLayout());
            add(new Label("JavaComponent: ");
            javaTextBox = new TextField(30);
            btn = new Button("Send");
         public void addActionListener(ActionListener l)
      For C#
      JavaComponent jc = new JavaComponent();
      The C# program compiles without errors but when runing up, it does not show the awt and gives an error of java.Lang.ClassNotFoundException occured in IKVM.Runtime.dll,
      System.IO.DirectoryNotFoundException in mscorlib.dll
      java.Lang.ClassNotFoundException occured in IKVM.OpenJDK.Core.dll

      Can anyone help?