This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse project -> Jar ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse project -> Jar ?" Watch "Eclipse project -> Jar ?" New topic
Author

Eclipse project -> Jar ?

jay vas
Ranch Hand

Joined: Aug 30, 2005
Posts: 407
Hi guys : Is there a full proof, easy way to turn an eclipse project into an java executable jar file ? Ive tried using fat jar, but it doesnt work (my project consists of 4 eclipse projects, using jar files which are embedded in those sub projects), the application depends on all 4 projects.

Im assuming that eclipse would come bundled with a jar generator, and since it clearly can internally handle such dependencies at compile and run time, it should be able to package up a jar automagically, but no luck so far.

please help !
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30353
    
150

Jay,
Eclipse comes with the ability to create a regular jar. For an executable jar, you do need a plugin or external program. I've never needed to do this, but Fat Jar is the number one google hit.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
jay vas
Ranch Hand

Joined: Aug 30, 2005
Posts: 407
Yeah.. I tried fat jar but it doesnt seem to work when there are multiple projects that depend on each other.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Jeanne Boyarsky:
Jay,
Eclipse comes with the ability to create a regular jar. For an executable jar, you do need a plugin or external program.


In fact, the "JAR Manifest Specification" page of the export wizard for jar files at the bottom has a "Select the class of the application entry point" field, which works well, in my experience.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Eclipse project -> Jar ?