在本机编译打包后运行正常,但是copy到别的机器上就找不到主类了。。求解释(打开方式的问题我是自己写了个bat:[code]java chatclient.ChatClient -jar ChatClient.jar[/code])

解决方案 »

  1.   

    看下其它机器上的jdk版本是不是比你打包用的版本低
      

  2.   

    分析一下bat有没有不同环境下的问题
      

  3.   

    你的batch脚本有问题
    估计里面的JDK环境配置不符合,毕竟是别人的机器。
      

  4.   

    楼主。。看看你的类的package包对不对??就是你代码的最上边一句话
      

  5.   

    你 export的时候有没有指定 
    Select the class of the application entry point:
    Main class:  ------ Browse...?
      

  6.   

    D:\jar>java -jar A.jar a.Test5
    我打的jar包放到D:\jar\A.jar,同时指明 Test5为入口
      

  7.   

    D:\jar>java -jar A.jar a.Test5
    我打的jar包放到D:\jar\A.jar,同时指明 Test5为入口
      

  8.   

    双击可以打开么
    或者
    java [-options] -jar jarfile [args...]
      

  9.   

    MANIFEST.MF的话,,
    "Manifest-Version: 1.0
    Class-Path: .
    Main-Class: chatclient.ChatClient"