我正在尝试探索JWS如何端到端地工作,正在关注这个博客。 JWS tutorial link
最初得到“未签名的jar错误”stackoverflow post - 现在可以修复, 但是现在它没有找到它的抛出类,尝试了多个东西,比如创建一个没有包等的类,但仍然无法正常工作。带有步骤等的新课程
我不确定它是否存在某些版本兼容性问题。
Apache tomcat - 8.0.23 Java -1.8.0_40-b26
JNLP文件详细信息
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/" href="JNLPExample.jnlp">
<information>
<title>JNLP Example</title>
<vendor>Java Code Geeks</vendor>
<homepage href="http://localhost:8080/" />
<description>JNLP Testing</description>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.6+" />
<jar href="JNLPExample.jar" />
</resources>
<application-desc main-class="main.javacodegeeks.JNLPExample" />
</jnlp>
课程详情
package main.javacodegeeks;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class JNLPExample extends JFrame {
private static final long serialVersionUID = 4968624166243565348L;
private JLabel label = new JLabel("Hello from Java Code Geeks!");
public JNLPExample() {
super("Jave Web Start Example");
this.setSize(350, 200);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setLayout(null);
}
public void addButtons() {
label.setSize(200, 30);
label.setLocation(80, 50);
this.getContentPane().add(label);
}
public static void main(String[] args) {
JNLPExample exp = new JNLPExample();
exp.addButtons();
exp.setVisible(true);
}
}
答案 0 :(得分:0)
JWS需要将外部jar放在\ lib \ ext目录中。