not all jar packages contain the main class
so you can't run them
for example:
you can package your classes into tow jars,but only one contain the main entry class,the other one will not runnalbe form the command line

解决方案 »

  1.   

    If you're sure the package can run from the command line, I think addtional information should be posted here to solve this problem
      

  2.   

    并不是所有的jar包都能运行,他的主程序没有main函数的话就不能运行
      

  3.   

    主程序里面没有main class,你可以用winrar打开jar文件,看一下里面的META-INF目录下的MENIFEST.MF文件里面有没有类似Main-Class: Main的行,有的话就是可以运行的。
      

  4.   

    jar文件中要声明Main-Class才行。
      

  5.   

    这个jar包是个安装程序,应该有main class的。
    我用java -jar 就能顺利运行。
      

  6.   

    你用winrar打开看看,在META-INF目录下的MANIFEST.MF文件,看看有没有指定Main-Class