我用的是jdk1.42,我想将最基本的helloworld.class化为可执行的jar文件,该怎样办,我试着化为了jar文件,但打开jar文件总说找不到mainclass或fail to load

解决方案 »

  1.   

    你用eclipse的导出功能就行了!
      

  2.   

    我不会使用EDI,就只说一般环境下
      

  3.   

    http://www.dayol.cn/html/life/all/2007/0617/4976.html
      

  4.   

    我用的是jdk1.42,在c盘下建了个文件夹helloworld,里面有helloworld.java,helloworld.class,还有MANIFEST.MF,其内容为:
    nifest-Version: 1.2
    Created-By: 1.4.2 (Sun Microsystems Inc.)
    Main-Class: helloworld 
    运行c:\helloworld>jar cfm helloworld.jar MANIFEST.MF helloworld.class双击helloworld.jar,但总是提示:fail to load main-class manifest attribute from c:\helloworld\helloworld.jar
      

  5.   

    我用的是jdk1.42,在c盘下建了个文件夹helloworld,里面有helloworld.java,helloworld.class,还有MANIFEST.MF,其内容为:  
    manifest-Version:  1.2  
    Created-By:  1.4.2  (Sun  Microsystems  Inc.)  
    Main-Class:  helloworld    
    运行c:\helloworld  >jar  cfm  helloworld.jar  MANIFEST.MF  helloworld.class  
     
    双击helloworld.jar,但总是提示:fail  to  load  main-class  manifest  attribute  from  c:\helloworld\helloworld.jar
      

  6.   

    javahome的路径是不是正确的啊??有可能哦