Domanda

This might be an odd question, but it's one that I would love solved.

In Eclipse, I've made a project. Beautiful GUI and all. When I hit Run as Java Application (or just Run for that matter), it all works wondrously.

What I want to know is:

What is the easiest way to make my precious project into a double-clickable file? So that when I mail it to a friend, said friend can just double-click the file and see what I do when I hit Run in Eclipse?

I'm a little new to Eclipse still, so the least complicated answer which works is the best one.

È stato utile?

Soluzione

You have several options. You can make:

  • runnable jar, from eclipse export and select a runnable jar as shown below:

    • Step 1

    Step 1

    • Step 2

Step 2

  • exe file or other runnable using launch4j - a free cross-platform tool for wrapping Java applications distributed as jars in lightweight Windows native executables)

Example: Step 1 enter image description here

Step 2 enter image description here

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top