Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 09-02-2007, 11:18 PM   #1
Fully Optimized
 
hascet's Avatar
 
Join Date: Jul 2006
Posts: 3,218
Default Running java through your website

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...
__________________

hascet is offline   Reply With Quote
Old 09-03-2007, 01:37 AM   #2
Site Team
 
celegorm's Avatar
 
Join Date: Sep 2006
Posts: 10,713
Send a message via AIM to celegorm
Default Re: Running java through your website

Oh, it's been a while, is that an applet, or an application? I believe browsers need it to be an applet.
__________________

__________________
"as a fanboy i refuse to admit it and will pull countless things out of my butt to disprove it"

Team Thelegorm! Total Kills: 21 (i iz in uor profile, editsing your sigz)
celegorm is offline   Reply With Quote
Old 09-03-2007, 02:10 AM   #3
Baseband Member
 
Join Date: Aug 2007
Posts: 96
Default Re: Running java through your website

Thats an application.

And, yes, it will need to be a Java Applet to run via HTTP.
__________________
Premium Web Hosting Provider ║ MambugHost.com
Need to upload files? ║ MambugLoad.com
Fast, Effective, Web Design ║ Mambug.com
Mambug is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 11:43 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0