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-06-2007, 05:24 PM   #1
Fully Optimized
 
hascet's Avatar
 
Join Date: Jul 2006
Posts: 3,218
Default Java help!

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);




    }
}
__________________

hascet is offline   Reply With Quote
Old 09-06-2007, 06:19 PM   #2
Baseband Member
 
Join Date: Aug 2007
Posts: 96
Default Re: Java help!

You need to get a translator. Java was designed to be portable, therefore requiring the IDE to run it.

If you want to translate Java code into machine language you'll need something like http://www.download.com/ExeJ/3000-24...ml?tag=lst-0-1
__________________

__________________
Premium Web Hosting Provider ║ MambugHost.com
Need to upload files? ║ MambugLoad.com
Fast, Effective, Web Design ║ Mambug.com
Mambug is offline   Reply With Quote
Old 10-11-2007, 11:11 AM   #3
In Runtime
 
CGfreak102's Avatar
 
Join Date: Apr 2007
Posts: 475
Default Re: Java help!

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
__________________
Core I7 920 OC'ed to 3.0Ghz, 6GB G.skill DDR3 1333, Intel DX58SO, 500GB seagate 7200RPM + 320GB seagate, EVGA 9800GTX+ , 600W PSU.
CGfreak102 is offline   Reply With Quote
Old 10-11-2007, 11:23 AM   #4
In Runtime
 
CGfreak102's Avatar
 
Join Date: Apr 2007
Posts: 475
Default Re: Java help!

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
__________________
Core I7 920 OC'ed to 3.0Ghz, 6GB G.skill DDR3 1333, Intel DX58SO, 500GB seagate 7200RPM + 320GB seagate, EVGA 9800GTX+ , 600W PSU.
CGfreak102 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 10:56 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