title: How to call Java Function in a lua coroutine?
body: <p>I'm developing a game by luajava.When I call a java function in a lua coroutine,I get an error "Invalid method call. No such method."
  Here is the code</p>
  
  <pre><code>package com.soyomaker;
  
  import org.keplerproject.luajava.LuaException;
  
  import org.keplerproject.luajava.LuaState;
  
  import org.keplerproject.luajava.LuaStateFactory;
  
  public class Main {
  
      public static void main(String[] args) {
          LuaState luaState = LuaStateFactory.newLuaState();
          luaState.openLibs();
          try {
              luaState.pushObjectValue(new People());
              luaState.setGlobal("people");
          } catch (LuaException e) {
              e.printStackTrace();
          }
          luaState.LdoFile("res/script.lua");
      }
  }
  
  //=============================================================================
  
  package com.soyomaker;
  
  public class People {
  
      public void sayHello(String name) {
          System.out.println("hello " + name);
      }
  
  }
  
  //=============================================================================
  
  print(people)
  
  print(people.sayHello)
  
  people:sayHello("Bill")
  
  function run()
  
    print("========run========")
  
    print(people)
  
    print(people.sayHello)
  
    people:sayHello("Jobs")
  
  end
  
  local co=coroutine.create(run)
  
  print(coroutine.resume(co))
  </code></pre>
  
  <p>Here is the result:</p>
  
  <pre><code>hello Bill
  
  userdata: 040256B8
  
  &lt;b&gt;function: 040252C0&lt;/b&gt;
  
  ========run========
  
  userdata: 040256B8
  
  &lt;b&gt;function: 04026650&lt;/b&gt;
  
  false   Invalid method call. No such method.
  </code></pre>
  
  <p>I print the "people.sayHello" twice,Unexpectedly,I get different results.</p>
  
  <p>How can I make it work? Thank you  advance!</p>