把做好的工程用MyEclipse导出为jar文件,按照工具提示做下来,main class 也加了,到了最后一步弹出警告对话框,内容如下显示为工程中的三个java文件导出时警告
JAR export finished with warnings. See details for additional information.
Exported with compile warnings: /TT/src/tel/Event.java
Exported with compile warnings: /TT/src/tel/Tel_farme.java
Exported with compile warnings: /TT/src/tel/Q_tel.java点击确定完成导出,双击生成的jar文件报错
could not find the main class : tel.Tel_farme program will exit 我已经在MyEclipse导出时添加了main class 怎么还是出错呢? 不知原因在哪?
JAR export finished with warnings. See details for additional information.
Exported with compile warnings: /TT/src/tel/Event.java
Exported with compile warnings: /TT/src/tel/Tel_farme.java
Exported with compile warnings: /TT/src/tel/Q_tel.java点击确定完成导出,双击生成的jar文件报错
could not find the main class : tel.Tel_farme program will exit 我已经在MyEclipse导出时添加了main class 怎么还是出错呢? 不知原因在哪?
jar -cvf yourJarName.jar *.*
然后:
java cn.com.comp.MainClass
这样试试。
我从来不用eclipse生成jar。