Java help!

hascet

Fully Optimized
Messages
3,218
I wrote this program in Java, but I can't figure out how to run it without opening it up in the IDE and running it through there. there must be some way to run it as like an .exe. Does anyone know how you would do that?

It just multiplies lol, but I wrote all on my own without any books or help, which is pretty sweet! I'm so proud of my multiplying program haha!
Code:
// The "Calculator" class.
import java.awt.*;
import hsa.Console;

public class Calculator
{
    static Console c;

    public static void main (String [] args)
    {
        c = new Console ();
        double num1, num2;
        c.println("Sean's Multiplication Calculator \n" + "Enter a number then <Enter>");
        num1 = c.readDouble ();
        c.println("Enter a second number then <Enter>");
        num2 = c.readDouble ();
        c.print(num1+"*"+num2+"=");
        c.print(num1*num2);




    }
}
 
you could also just make a HTML file, that has as set size limit and is in the folder with the program and run it through IE7 or your choice of web browser as long as it is JAVA enabled
 
i think this is what it looks like,

<HTML>
<HEAD>


<applet code>="your java file name.class" width=800 height=800</applet>


</HEAD>
</HTML>


i will check to see if it is correct when i have the chance to open a file
 
Back
Top Bottom