14

I have built a Java application that has some dependencies (~10). I would like to easily package this application up and deploy it as a single file to a CD or USB drive.

There doesn't seem to be any "nice" wizard to search the project, grab the dependencies and setup the classpath on the target computer. I have to do this manually.

Is there a better way? Something simple, easy and straight-forward. A link to a tutorial on this would be great.

Seems to me that this should be a built-in feature to eclipse. Deployment of a web application seems easy enough, but not a Java application.

DonQuijote
  • 47
  • 8
Rick
  • 648
  • 1
  • 11
  • 25

2 Answers2

9

Have a look at the Fat Jar Plug-In.

kgiannakakis
  • 103,016
  • 27
  • 158
  • 194
  • 4
    Too bad, it doesn't work on Eclipse Luna, I get the following error on install: An error occurred while installing the items session context was:(profile=epp.package.standard, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]net.sf.fjep.fatjar 0.0.31, action=). Failed to prepare partial IU: [R]net.sf.fjep.fatjar 0.0.31. – Jay Imerman Aug 11 '14 at 19:08
4

That's because desktop deployment isn't well defined.

You are heading into release issues which is a huge can of worms.

I assume you have some form of version control like SVN or git? If so check out maven with the release plugin and maven-assembly-plugin

It'll take a lot of work to setup, but once you get it going you'll be cross linking and deploying distribution packages in no time!

Plus you'll have access to the vast maven repos on the web right now

Pyrolistical
  • 27,624
  • 21
  • 81
  • 106
  • Believe or not - This project doesn't have source control!!! WTF Right! :) Thanks the advice. – Rick Mar 31 '10 at 19:01