0

3つのGUIフォームがあります

  • main1.java
  • main2.java
  • main3.java

主な方法で。package1他の2つに1つはにありpackage2ます。

package1.main1プロジェクト構成でメインクラスとしてを設定しました。クリーンビルド後、.jarファイルを友人に送信すると、エラーが表示されます- couldn't find main class。マニフェストファイルをチェックインしましたが、すべて正しいようでpackage2、jarファイルの中にはありません。

これを修正するのを手伝ってください。

参考までに、私はnetbeans7.2を使用しています

4

1 に答える 1

0

I think its still some inconsistency in your jar. I would suggest the following:

run the following command in order to track the content of your jar:

jar tf YOUR_JAR_FILE_COMES_HERE

After you ensure that all the packages are places correctly and the Main class really exists there Double check your MANIFEST.MF file. Once the main class is defined correctly here your friend should be able to run java -jar YOUR_JAR_FILE_COMES_HERE_AGAIN

Another concert that I would check, On windows file names are case insensitive, while on linux/unix its not the case, you'll have to check the all the uppercases/lowercases are set up correctly.

Hope this helps

于 2012-11-20T07:43:35.200 に答える