Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8601267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:48:12+00:00 2026-06-12T01:48:12+00:00

I made a simple hello world program which just makes a window pop up

  • 0

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?

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

Here is the 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();
    }
}

I’m so sorry for such a pathetic question. first time fiddling with java.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:48:13+00:00Added an answer on June 12, 2026 at 1:48 am

    If you’re using eclipse, you could do this:

    1. Right click your project
    2. Click Export
    3. Select Java
    4. Select Runnable Jar File
    5. Select the Launch Configuration (would usually be the name of your
      project or class that contains the main method
    6. Choose the path to save the jar file to
    7. Click Finish

    That’s it. Now you get a .jar file which can be run like a normal executable file on every computer which has Java installed. Regardless of the operation system.

    Just passing the .class file would suffice, but it would force the other user to launch it via command line using java MyClassName (without the .class suffix)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to compile servlets outside of NetBeans. I made a simple Hello World
I just installed Ubuntu 8.04 and Eclipse. I made a very simple Hello World
I've written this simple program which displays key presses, draws the phrase Hello World,
Hello I made a simple racket program on windows xp sp3 I wonder how
The following simple Java program appears to display the string Hello World through the
I would like to see a 'Hello world' program written in C/C++ but made
I made the simple hello world NODEJS Server. I have a enyo web service
i am new to servlets. I made a simple hello world programme that prints
hi i've got question i've made simple form with attachment input and i want
so I'm making some basic programming language (just for exercise). I've made simple grammar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.