mahela007
mahela007

Reputation: 1439

packaging and distributing java application with external Jar files

Until now, my java applications have consisted only of my own .java files. However, my current project uses Antlr and some of the Antlr functionality is contained in a JAR file which I had to import into eclipse. What is the best way to distribute my application so that end users can run it?

I have read a few questions on stack overflow about similar issues... Some of the answers recommend packaging my project as a JAR file while others recommend tools like Maven. First of all, I next to nothing about Maven but from what I've read, it seems like overkill for a simple project such as this. As for JAR files, I understand that they are collections of .java files, similar to zip archives. There were two variations of JAR files that I came across called 'self extracting jar's and executable jars. What's the difference between them? Which one should I use?

Upvotes: 0

Views: 473

Answers (1)

Silviu Burcea
Silviu Burcea

Reputation: 5348

Maven does not have something to do with project size. Maven is independent, your end-users won't know you packed your JAR with Maven. There are a couple of plugins for this kind of task. Give it a try before saying it's overkill. Maven can also help you managing the dependencies. If you liked Ant, there's a plugin to run Ant tasks too.

Some people recommended it, have you asked yourself why? Every great tool, like Maven, is solving some (common) problems, that's why is successful.

About the type of JARs: does your JAR must be installed or just double-click and run as it is? Now you know what kind of JAR you want.

Upvotes: 1

Related Questions