Running a simple Hello World program
<p>I made a simple hello world program which just makes a window pop up with the title being "hello world". I want to know, What do I give to someone if I want them to run it like a normal java program? Would a .class file be enough?</p>

<p>do I just take the .class file and try to open it with java?</p>

<p>Here is the code: </p>

<pre><code>import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;


public class hellobox {

    public static void main(String[] args) {
        Display display = new Display();
        Shell shell = new Shell(display);
        shell.setText("Hello world!");
        shell.open();
        while (!shell.isDisposed()) {
            if (!display.readAndDispatch()) 
                display.sleep();
        }
        display.dispose();
    }
}
</code></pre>

<p>I'm so sorry for such a pathetic question. first time fiddling with java.</p>
