dpolaristar
dpolaristar

Reputation: 69

Create an Exec File in Eclipse

I'm sure the answer is really obvious and right in front of my nose, but I am writing programs in Eclipse and I'd like to be able to run them outside of the workspace. (Like on the command line.)

Problem is I can't find the executable file in the file explorer. So I have to ask....

How do you run programs you write in Eclipse OUTSIDE Eclipse? (Program is in java.)

I just recently switched from Visual Studios to Eclipse so I don't really know Eclipse well. Most of the time figuring out the IDE is more hard to actual coding really.

Upvotes: 0

Views: 527

Answers (1)

Max Hniebergall
Max Hniebergall

Reputation: 58

The executable can be created by Clicking: file -> Export -> As Runnable Jar File

Then make sure launch configuration is set to the correct project, and that the export destination is where you want it to be. Then Click finish, and your runnable jar file should appear where you specified.

If the program has a GUI, it can be run like a regular exe file (double clicking, etc.) if it does not have a GUI it will need to be launched from the command line (ie, by navigating to it with CMD, or with a batch file).

Upvotes: 1

Related Questions