title: java.lang.String cannot be cast to system.Object
body: <p>I have used JNI4NET framework to invoke .Net code from Java.
  JNI4NET has generated proxy class for .Net code. One of the methods accept system.Object as an input parameter.</p>
  
  <p>I want to send String value as input to that method. I have wrote the below code for that-</p>
  
  <pre><code>        String s = "test";
          Object b = s;
          system.Object object = (system.Object) b;
  </code></pre>
  
  <p>And passing this obj as an input to proxy method. The above code throws runtime exception java.lang.String cannot be cast to system.Object. Any help or pointers will be useful.</p>