怎么做jar文件?

来源:百度知道 编辑:UC知道 时间:2024/05/20 00:16:42
手机游戏的安装文件都是jar格式的。。。我通过一些方法把class文件改了。。。但是要怎么放回去?
各位稍微解释一下,这样我肯定看不明白的

1. 创建类文件:

C:\J2ME\apps\PhoneCalendar>
javac _ tmpclasses _ootclasspath
C:\J2ME\lib\midpapi.zip -classpath tmpclasses;
classes src\*.java

2. 创建清单文件 manifest.mf :

MIDlet-1: PhoneCalendar,
PhoneCalendar.png,
PhoneCalendar
MIDlet-Name: Phone Calendar
MIDlet-Vendor: Sun Microsystems
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-1.0

3. 创建 jar 文件:

C:\J2ME\apps\PhoneCalendar>jar cfm .\bin\
PhoneCalendar.jar
manifest.mf -C classes . _ res .

4. 创建 jad 文件:

MIDlet-1: PhoneCalendar,
PhoneCalendar.png,
PhoneCalendar
MIDlet-Jar-Size: 4490
MIDlet-Jar-URL:
F:\J2ME\apps\PhoneCalendar\bin\
PhoneCalendar.jar
MIDlet-Name: PhoneCalendar
MIDlet-Vendor: Sun Microsystems
MIDlet-Version: 1.0

5. 运行 jad 文