未找到 JWS 类错误 [英] JWS Class not found error
问题描述
我试图探索 JWS 的端到端工作方式,正在关注此博客.JWS 教程链接>
最初得到未签名的 jar 错误"stackoverflow post- 现在可能已修复,但是现在找不到它的抛出类,尝试了多种方法,例如创建一个没有包的类等,但仍然无法正常工作.一个带有步骤等的新类
我不确定是不是版本兼容性问题.
Apache tomcat - 8.0.23Java -1.8.0_40-b26
<小时>JNLP 文件详细信息
课程详情
package main.javacodegeeks;导入 javax.swing.JFrame;导入 javax.swing.JLabel;公共类 JNLPExample 扩展 JFrame {私有静态最终长serialVersionUID = 4968624166243565348L;private JLabel label = new JLabel("Java Code Geeks,你好!");公共 JNLPExample() {super("Jave Web Start 示例");this.setSize(350, 200);this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);this.setLayout(null);}公共无效 addButtons() {label.setSize(200, 30);label.setLocation(80, 50);this.getContentPane().add(label);}公共静态无效主(字符串 [] args){JNLPExample exp = new JNLPExample();exp.addButtons();exp.setVisible(true);}}
JWS 需要外部 jars 到 \lib\ext 目录下.
I was trying to explore how the JWS works end to end, was following this blog. JWS tutorial link
initially got "unsigned jar error" stackoverflow post- may be fixed now, but now its throwing class not found, tried multiple things like creating a class without package etc etc, but still its not working. A new class with the steps etc.
I am not sure if its some version compatibility issue or not.
Apache tomcat - 8.0.23 Java -1.8.0_40-b26
JNLP file details
<?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>
Class details
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);
}
}
JWS needs the external jars to b in the \lib\ext directory.
这篇关于未找到 JWS 类错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!