0

I have made a hello world program in eclipse and I was wondering how to run it out of eclipse (not on the console). I want to run it like you would with a .exe. Is this possible?

7

1 Answer 1

6

If you exported your program as an .exe, you would only be able to run it natively on Windows (the point of Java is that it is cross platform). You want to export it as a Runnable JAR File, which should be one of the export options in Eclipse:

enter image description here

By default, no console window will be opened when you try to open your JAR file, so any calls to System.out or System.err will be invisible. You can either run your JAR file through command prompt (java -jar YourJarFile.jar) or create a GUI for your user to interact with.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.