程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> JAVA編程 >> 關於JAVA >> jad文件的錯誤代碼

jad文件的錯誤代碼

編輯:關於JAVA

jad ( Java Application Discriptor ) 文件是J2ME的一個重要的組成部分,在我們發布J2ME程序的時候,jad文件經常報出各種錯誤,如:

com.sun.kvem.midletsuite.InvalidJadException: Reason = 13

其中的錯誤原因是1-52的代碼,很讓人費解。我在網上找到了這些代碼的解釋,和大家分享如下:

public static final int JAD_SERVER_NOT_FOUND = 1;public static final int JAD_NOT_FOUND = 2;public static final int MISSING_PROVIDER_CERT = 4;public static final int CORRUPT_PROVIDER_CERT = 5;public static final int UNKNOWN_CA = 6;public static final int INVALID_PROVIDER_CERT = 7;public static final int CORRUPT_SIGNATURE = 8;public static final int INVALID_SIGNATURE = 9;public static final int UNSUPPORTED_CERT = 10;public static final int EXPIRED_PROVIDER_CERT = 11;public static final int EXPIRED_CA_KEY = 12;public static final int MISSING_SUITE_NAME = 13;public static final int MISSING_VENDOR = 14;public static final int MISSING_VERSION = 15;public static final int INVALID_VERSION = 16;public static final int OLD_VERSION = 17;public static final int MISSING_JAR_URL = 18;public static final int JAR_SERVER_NOT_FOUND = 19;public static final int JAR_NOT_FOUND = 20;public static final int MISSING_JAR_SIZE = 21;public static final int SUITE_NAME_MISMATCH = 25;public static final int VERSION_MISMATCH = 26;public static final int VENDOR_MISMATCH = 27;public static final int INVALID_KEY = 28;public static final int INVALID_VALUE = 29;public static final int INSUFFICIENT_STORAGE = 30;public static final int JAR_SIZE_MISMATCH = 31;public static final int NEW_VERSION = 32;public static final int UNAUTHORIZED = 33;public static final int JAD_MOVED = 34;public static final int CANNOT_AUTH = 35;public static final int CORRUPT_JAR = 36;public static final int INVALID_JAD_TYPE = 37;public static final int INVALID_JAR_TYPE = 38;public static final int ALREADY_INSTALLED = 39;public static final int DEVICE_INCOMPATIBLE = 40;public static final int MISSING_CONFIGURATION = 41;public static final int MISSING_PROFILE = 42;public static final int INVALID_JAD_URL = 43;public static final int INVALID_JAR_URL = 44;public static final int PUSH_DUP_FAILURE = 45;public static final int PUSH_FORMAT_FAILURE = 46;public static final int PUSH_PROTO_FAILURE = 47;public static final int PUSH_CLASS_FAILURE = 48;public static final int AUTHORIZATION_FAILURE = 49;public static final int ATTRIBUTE_MISMATCH = 50;public static final int PROXY_AUTH = 51;public static final int TRUSTED_OVERWRITE_FAILURE = 52;

有了這些代碼的解釋,我們就很容易知道錯誤的原因了。

另外,大家知道,有的手機在安裝jar文件的時候,不需要jad文件。這是因為手機廠商在操作系統中內置了對jar文件的解析功能。就如同手機自動生成jad文件,然後使用這個jad文件安裝jar文件一樣。

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved