后来修改了 codebase 还是显示找不到主类!! 出错信息是这样写的:
-------------------------------------------------
启动/运行应用程序时发生错误。标题: TestDB
供货商:Dove
类别:启动文件错误在 http://192.168.0.223:8080/examples/apps/lib/JavaWebStart.jar 中找不到主类 TestDB.class-------------------------------------------------------这是修改以后的 JWSTest.jnlp------------------------------------
<?xml version="1.0" encoding="utf-8"?><!-- JNLP File for SwingSet2 Demo Application --><jnlp spec="1.0+" codebase="http://192.168.0.223:8080/examples/apps/lib" href="JWSTest.jnlp"> <information> <title> TestDB</title> <vendor>Dove</vendor> <homepage href=" test.html"/> <description> JWS Test </description> <icon href="images/com.gif"/> <offline-allowed/> </information> <security> <all-permissions/> </security> <resources> <j2se version="1.4"/> <jar href="JavaWebStart.jar"/> </resources> <application-desc main-class="TestDB.class"/></jnlp>
-------------------------------------------------
启动/运行应用程序时发生错误。标题: TestDB
供货商:Dove
类别:启动文件错误在 http://192.168.0.223:8080/examples/apps/lib/JavaWebStart.jar 中找不到主类 TestDB.class-------------------------------------------------------这是修改以后的 JWSTest.jnlp------------------------------------
<?xml version="1.0" encoding="utf-8"?><!-- JNLP File for SwingSet2 Demo Application --><jnlp spec="1.0+" codebase="http://192.168.0.223:8080/examples/apps/lib" href="JWSTest.jnlp"> <information> <title> TestDB</title> <vendor>Dove</vendor> <homepage href=" test.html"/> <description> JWS Test </description> <icon href="images/com.gif"/> <offline-allowed/> </information> <security> <all-permissions/> </security> <resources> <j2se version="1.4"/> <jar href="JavaWebStart.jar"/> </resources> <application-desc main-class="TestDB.class"/></jnlp>
<dir>com
<dir>META-INF
DataBase.java
TestDB.java
JavaWebStart.jcp (我用 JCreator 写的代码)
DataBase.class
TestDB.class----------------------------
这里面明明有 TestDB.class 啊。而且在 JCreator 里面也可以正常运行
这个程序很简单,就是在 Form 里面加上一个按钮,一个文本区。
使用 BorderLayout。我只是想测试一下 Java Web Start。因为我们的应用程序可能需要用它来发布