Running java through your website

hascet

Fully Optimized
Messages
3,218
How would you run a java program in your website? Its kind of confusing how to word it but I have this:
Code:
//Rectangle Program
import java.awt.*;
import hsa.Console;
public class Rectangle Program
{
    static Console c;
    public static void main (String[] args)
    {
	c = new Console ();
	int length, width;
	c.println("RECTANGLE PROGRAM");
	c.println("Type in the length of the rectangle and hit <Enter>");
	length = c.readInt();
	c.println("Type in the width of the rectangle and hit <Enter>");
	width = c.readInt();
	c.setColor(Color.green);
	c.fillRect(100,100,length,width);
    } 
}
Its really simple java where all it does is make a rectangle lol, but I'm still learning, and I want it to run through a web browser on my website...
 
Oh, it's been a while, is that an applet, or an application? I believe browsers need it to be an applet.
 
Thats an application.

And, yes, it will need to be a Java Applet to run via HTTP.
 
Back
Top Bottom