一直迷茫中的打包疑问
我现在有目录结构
editboy/texts/..
我的image文件夹 editboy/texts/image/
我的config文件夹 editboy/texts/config/(里面放着config.xml)
我的prefence文件夹 editboy/texts/prefence/(里面放着一写java文件,每个文件头都有package texts.prefence;)
我的主要java文件在 editboy/texts/(下面放着主要的java文件,其中每个文件头都有package texts;)
我的manifest.mf的内容为
Manifest-Version: 1.0
Created-By: 1.4.1_01 (Sun Microsystems Inc.)
Main-Class: texts.Text
其中Text.java(他在editboy/texts/目录下)是包含main的类。
我编译打包后的jar文件双击后没反应,也不包错也没反应,但是我如果在dos调用java -jar 我的jar文件名.jar却可以正常运行出这个jar,出现程序界面。
我编译方法
在editboy/下运行javac -d texts\ texts/*.java,然后在editboy/texts/下又生成texts文件佳,就是class文件都在editboy/texts/texts/下面
我java的方法是在editboy/texts/下运行 java texts.Text,可以正常显示程序界面
我打包的方法是在editboy/texts/下运行
jar cvfm EditBoy.jar manifest.mf texts
生成的EditBoy.jar就在editboy/texts/下,结果就双击没反应,但是用java -jar EditBoy.jar就正常了,问为什么啊?是不是我的打包方式不对啊?