1. 打包
jar -cf FileName.jar class1.class class2.class ....
-c选项意味着创建一个新的包,-f选项说明确定了包的名字。
Manifest文件
Manifest-Version: 1.0
Created-By: 1.4.0_02 (Sun Microsystems Inc.)
Main-Class: SimpleExample
2. 运行包
往Manifest种增加一个Main-Class信息
具体方法:
新建temp.mf,内容:
Main-Class: SimpleExample
Sealed: true
然后运行
jar -uvmf temp.mf SimpleExample.jar
-u: updating -v: 显示信息 -m: 增加到manifest文件
运行包:java -jar SimpleExample
3. 在html中运行包
>applet
code = "xxx.class"
archive = "xxx.jar"
...
<
>/applet<
4. 界面更换
java.lang.Object
extended by javax.swing.UIManager
UIManager.setLookAndFeel(LookAndFeel);

posts - 403, comments - 310, trackbacks - 0, articles - 7
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

2.12 Java notes - Applets, Images, and Audio

Posted on 2007-04-22 20:23 ZelluX 阅读(102) 评论(0)  编辑  收藏 所属分类: OOP
2007-02-12 21:11:22
只有注册用户登录后才能发表评论。


网站导航: