由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - 为什么我这个html找不到applet class?
相关主题
Re: How to showStatus in Applet?how to start a local program
can applet implements runnable?赶快帮帮我!
●●●●紧急求助JAVA初级问题,今天project due●●●●再问个java的蠢问题,别骂我
想听本版对下面这段话的点评愣是笨到家----整不明白applet的path
String和java.lang.String有区别吗?How do a Servlet sent a Applet?
Sun's Java Tutorial problem: failed to load appletRe: experience of handling local files in applet?
Re: How to write to a file on server in an applet?Re: SWING APPLET如何显示IMAGE?
a question regarding appletjava的一些错误认识(转贴)
相关话题的讨论汇总
话题: applet话题: html话题: applets话题: started话题: java
进入Java版参与讨论
1 (共1页)
z*********e
发帖数: 10149
1
璺熻繖涓狦etting Started With Applets鍐欎簡涓
z*********e
发帖数: 10149
2
I'm following this java tutorials- Getting Started WIth Applets
here are my files:
======================================
HelloWorld.java
import javax.swing.*;
import java.lang.reflect.InvocationTargetException;
public class HelloWorld extends JApplet{
public void init(){
try {
SwingUtilities.invokeAndWait(new Runnable(){
public void run(){
JLabel label = new JLabel("Hello World!");
add(label);
}
});
} catch (InterruptedException e) {
System.err.println("createGUI didn't complete successfully");
e.printStackTrace();
} catch (InvocationTargetException e) {
System.err.println("createGUI didn't complete successfully");
e.printStackTrace();
}
}
}
=============================================================
HelloWorld.html





This file launches the 'A' applet: A.class!



No Java?!



==============================================================
I tossed HelloWorld.class and HelloWorld.html under /var/www/html/ which is
my apache www folder, and edited the security policy by adding my vps
address as an Exception in java control panel.
When I tried to open http://ipaddressofmyvps/HelloWorld.html
I got this error in attachement

【在 z*********e 的大作中提到】
: 璺熻繖涓狦etting Started With Applets鍐欎簡涓
z*********e
发帖数: 10149
3


【在 z*********e 的大作中提到】
: I'm following this java tutorials- Getting Started WIth Applets
: here are my files:
: ======================================
: HelloWorld.java
: import javax.swing.*;
: import java.lang.reflect.InvocationTargetException;
: public class HelloWorld extends JApplet{
: public void init(){
: try {
: SwingUtilities.invokeAndWait(new Runnable(){

z*********e
发帖数: 10149
4
原来要把class扔到jar里面才可以用
1 (共1页)
进入Java版参与讨论
相关主题
java的一些错误认识(转贴)String和java.lang.String有区别吗?
Top Ten Errors Java Programmers Make(3)Sun's Java Tutorial problem: failed to load applet
Help: 有大虾在 Applet 中用过 UDP socket 麽?Re: How to write to a file on server in an applet?
理解Java Servlets [fwd]a question regarding applet
Re: How to showStatus in Applet?how to start a local program
can applet implements runnable?赶快帮帮我!
●●●●紧急求助JAVA初级问题,今天project due●●●●再问个java的蠢问题,别骂我
想听本版对下面这段话的点评愣是笨到家----整不明白applet的path
相关话题的讨论汇总
话题: applet话题: html话题: applets话题: started话题: java