the simple way:
myapp.main(new String[]("argument1","argument2"));

解决方案 »

  1.   

    楼上的,SAUCER的意思好像是直接调用MYAPP的MAIN方法
      

  2.   

    嘿嘿,一般的JAVA程序都是从调用主类的main函数开始的,我的做法只是直接调用它而已,你可以改动其参数,甚至设其为null:
    myapp.main(null);当然你可能需要import跟myapp有关的package
      

  3.   

    谢谢楼上:
    当为什么我用Runtime.getRuntime().exec("java myapp");
    就不可以呢?
      

  4.   

    Runtime.getRuntime().exec("java myapp"); 
    starts another process, in this case, it starts another JVM, do they share the console? I have no idea