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!
==============================================================
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鍐欎簡涓