Free Monkey
Make Anything Mobile!
BlogJava
首页
新随笔
联系
聚合
管理
随笔-1 评论-11 文章-52 trackbacks-0
Java 网络加载协议 (JNLP)
Java 网络加载协议 (JNLP): 是 Java Web Start 的一个组成协议,通常定义为一种通过网络并穿透防火墙传输驻留于服务器的应用程序、并在客户机上启动它的机制。
Java(TM) Web Start:是一种简化 Java 应用程序部署的技术,让用户不需要复杂的安装过程,单击 Web 浏览器就可以启动全功能的应用程序。J2SE 捆绑了 Java Web Start。
D/S结构(Destktop Application/Server Application):客户端使用Swing,服务器端使用Servlet,采用Swing 和 Servlet来交换数据,可以采用标准的HTTP协议来通讯,来交换数据。
JNLP 文件其实是一个xml文件,描述了产品信息,使用的jar文件网址和 main-class 定义等。
客户端点击 JNLP 文件的连接,就会激活本地的 Java Web Start,选择下载 jar 包后,下载完备就可以运行相关的程序。可以操作本地数据,其实是把 jar 包下载到本地(每次允许都会自动更新),调用远程的 servlet 来交互数据。
样例 JClaim 的jclaimsf.jnlp 代码清单:
<?
xml version="1.0" encoding="utf-8"
?>
<!--
~ Copyright (c) 2006, ITBS LLC. All Rights Reserved.
~
~ This file is part of JClaim.
~
~ JClaim is free software; you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation; version 2 of the License.
~
~ JClaim is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with JClaim; if not, find it at gnu.org or write to the Free Software
~ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
~
-->
<
jnlp
spec
="1.0+"
codebase
="http://jclaim.sourceforge.net"
href
="/jclaimsf.jnlp"
>
<
information
>
<
title
>
JCLAIM
</
title
>
<
vendor
>
ITBS LLC
</
vendor
>
<
description
>
Java Compliant Logging and Auditing Instant Messenger.
</
description
>
<
description
kind
="short"
>
JCLAIM
</
description
>
<
icon
href
="/logo.gif"
/>
</
information
>
<
security
>
<
all-permissions
/>
</
security
>
<
resources
>
<
j2se
version
="1.5"
max-heap-size
="25m"
/>
<
jar
href
="jclaim.jar"
main
="true"
/>
<
jar
href
="cos.jar"
/>
<
jar
href
="jaimlib.jar"
/>
<
jar
href
="jazzy.jar"
/>
<
jar
href
="jdic.jar"
/>
<
jar
href
="joscar.jar"
/>
<
jar
href
="jsocks.jar"
/>
<
jar
href
="msnm.jar"
/>
<
jar
href
="oscar.jar"
/>
<
jar
href
="smack.jar"
/>
<
jar
href
="ymsg.jar"
/>
</
resources
>
<
resources
os
="Mac"
>
<
jar
href
="lib/mac/jdic_misc.jar"
/>
</
resources
>
<
resources
os
="Windows"
>
<
jar
href
="lib/win32/jdic_misc.jar"
/>
<
jar
href
="lib/win32/jdic_stub.jar"
/>
<
nativelib
href
="lib/win32/native.jar"
/>
</
resources
>
<
resources
os
="Linux"
>
<
jar
href
="lib/linux/jdic_stub.jar"
/>
<
nativelib
href
="lib/linux/native.jar"
/>
</
resources
>
<
resources
os
="SunOS"
arch
="x86"
>
<
jar
href
="lib/sunos/jdic_stub.jar"
/>
<
nativelib
href
="lib/sunos/native.jar"
/>
</
resources
>
<
resources
os
="SunOS"
arch
="sparc"
>
<
jar
href
="lib/sunos/jdic_stub.jar"
/>
<
nativelib
href
="lib/sunos/native.jar"
/>
</
resources
>
<
application-desc
main-class
="com.itbs.aimcer.gui.Main"
>
</
application-desc
>
</
jnlp
>
资源:
Java Web Start
http://java.sun.com/products/javawebstart/developers.html
动态 JNLP
https://www6.software.ibm.com/developerworks/cn/education/java/j-dynjnlp/tutorial/j-dynjnlp-1-1.html
posted on 2006-03-09 01:15
Xu Jianxiang
阅读(535)
评论(1)
编辑
收藏
所属分类:
Java Tech
评论:
#
re: Java 网络加载协议 (JNLP)
2007-03-29 14:21 |
jaly
这句是不是有些问题:<nativelib href="lib/win32/native.jar"/>
在JDIC官方网上有这么一句话:
NOTE: the native jar file name must be jdic-native.jar. Since the application needs to retrieve the native files after the jar file is unjar'ed by Java Web Start.
请楼主再测试一下。
回复
更多评论
IT新闻
新用户注册
刷新评论列表
标题
姓名
主页
验证码
*
内容(请不要发表任何与政治相关的内容)
Remember Me?
登录
使用高级评论
新用户注册
返回页首
恢复上次提交
[使用Ctrl+Enter键可以直接提交]
相关文章:
数据容器与静态代理
JAVA程序中设置连接代理
构建 Java API 文档
随机生成N位数字/字母密码
从JBuilder 2006到MyEclipse 5.0
国际化 Java 应用程序
Java Errors and Exceptions
Java 网络加载协议 (JNLP)
Oracle,JDBC与JDK
The J2EE Tutorial
相关链接:
网站导航:
博客园
BlogJava
博客生活
IT博客网
C++博客
PHP博客
博客园社区
管理博客
教师博客
天文博客
汽车博客
足球博客
股票博客
电子博客
管理
<
2007年3月
>
日
一
二
三
四
五
六
25
26
27
28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6
7
常用链接
我的随笔
我的评论
我的参与
最新评论
随笔分类
Some Thing(1)
文章分类
Design Research(6)
Java Tech(11)
Life and Work(7)
Mobile Tech(4)
Open Source(14)
Other Tech(4)
Server Side(6)
Web 2.0(1)
Design Patterns
FluffyCat (Larry Truett)
J 道
良葛格
XMPP/Jabber
Aaron Johnson
bluemonkey 遥远的回忆
oranje的专栏
搜索
最新评论
1. re: MySQL的limit参数
评论内容较长,点击标题查看
--网友
2. re: Windows 2003下配置Apache代理Tomcat集群
收藏了
--jdonee
3. re: Macromedia JRun 4 简明手册
原来写过一份关于JRUN4的文档,最近2年很少使用了,现在用Tomcat比较多,这份写作计划也就淡了下来。
都是比较基础的东西,以后有空也会补上的,呵呵。
--Xu Jianxiang
4. re: Macromedia JRun 4 简明手册
怎么没有内容?
--czw698
5. re: Windows 2003下配置Apache代理Tomcat集群
session是一样的,:)
--netpirate