我試圖在使用maven webapp archetype創建並導入到Eclipse中的java web動態項目中的HTML 5文件或JSP頁中運行applet。Maven webapp原型中的參考applet類eclipse classnotfound異常
文件夾結構:
MYPROJECT - 部署描述符:myproject的 - JAX-WS Web服務 - Java的Rsources -src /主/ JAVA com.mypackage.servlets servletsrc.java
-Applets
com.myappletpackage.applets
appletcode.java
Libraries
Java Script Resources
Deployed Resources
src/
/main/
java/ ... sourcecode
/webapp
/HtmlfileCallingApplet.html
/file.html
target/
/myproject
/META-INF
/WEB-INF/
/Classes/
/com/
/mypackage
servlet.class
/myappletpackage
appletcode.class
/lib/
什麼是在我的html頁面引用appletcode.class的神奇代碼?如果我部署此 包,這裏是我試過
var attributes = {codebase:'http://localhost/Myproject/WEBINF/classes/com/MyAppletPackage/Appletcode.class',
code: 'com.MyAppletPackage.Appletcode.class',
archive: 'MyProject.war',
width: '800',
height: '600'};
var parameters = {java_arguments: '-Xmx256m'}; // customize per your needs
var version = '1.5'; // JDK version
deployJava.runApplet(attributes, parameters, version);
`