为什么在java文件中有包时.可以用javac去编译,但是不能够用java去执行呢.
请问怎么解决

解决方案 »

  1.   

    楼主是否正确指定了需要运行 类的路径?用classpath
      

  2.   

    有包的话需要加上包名来运行
    包test中的TestApp.class
    java test.TestApp
      

  3.   

    一般按工程来写代码的时候 因为代码不同包 编辑和运行都有点区别http://www3.eastgame.net/simple/index.php?t819864.html