I am currently trying to get into Java programming, and I understand (for the most part) the mechanics of it but I am running into trouble when I try to do a simple hello world.
I have the .html set up, and I was able to go through dos to get the class file made using javac (using JDK 1.7.0_01) but when I open the html it says the title but when it gets to the <applet> </applet> and trys to read that file it says Error click here for details, but it locks up my explorer.
import java.applet.*;
import java.awt.*;
public class HelloWorld extends Applet
{
public void paint (Graphics g)
{
g.drawString("Hello World!", 50, 25);
}
}
is the .java file
HTML file
<HTML>
<HEAD>
<TITLE>Hello World Applet</TITLE>
</HEAD>
<BODY>
<CENTER>
<H1>Hello World Applet</H1>
<APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25></APPLET>
</BODY>
</HTML>
anyone see anything that may cause this?