It should be quite simple:

Right Click on your Project, choose Export, choose Runnable JAR file, choose your Main Class and the destination JAR file.

Done

In my case one Problem occured:

The Project worked properly from within the Eclipse Development Suite, but exported as jar file the rmi connection to the Robot could not be established.

Following Error Message occured:

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.net.MalformedURLException: unknown protocol: rsrc

Somehow the newest Eclipse versions use a preloader that messes things up.

As workaround i can recomend Fat Jar (http://fjep.sourceforge.net/) to build the Jar file. It worked for me.

4 Responses to “Creating Jar files from Eclipse”

  1. Piotr says:

    Hi!
    Thanks for this message, it saved me a lots of debugging time.

    Regards
    Piotr

  2. This post is very usefull thx!

  3. Zem says:

    Hey There. I found your blog using msn. This is a very well written article. I will make sure to bookmark it and return to read more of your useful information. Thanks for the post. I will certainly return.

  4. Andreas says:

    Danke – das (Fat Jar) hab ich gesucht…*uff*

Leave a Reply