A beginner in Java followed the tutorial and wrote an applet program and reported an error when running! The source code is posted below:
HelloWorldApplet.java source code:
import java.applet.*;
import java.awt.*;
public class HelloWorldApplet extends Applet
{
public void paint(Graphics g)
{
g.drawString("Hello World !",10,50);
}
}
FirstApplet.html source code:
Brother, did you go to the wrong place?
Brother, did you run into the wrong place?
I also think the path is wrong, how can I change it? Humbly asking for advice?
The current path is not added to CLASSPATH.
How to write the current path in the configuration. I forgot. Check it yourself.
The current path is not added to CLASSPATH.
How to write the current path in the configuration. I forgot. Check it yourself
After adding the java-related CLASSPATH=%JAVA_HOME%/lib/tools.jar;%JAVA_HOME%/lib/dt.jar, add the current path? It doesn’t seem to work after I added it!
This is the html section. Go to the java section and ask.