• Post Reply Bookmark Topic Watch Topic
  • New Topic

Releasing A JAR  RSS feed

 
Simon Ritchie
Ranch Hand
Posts: 134
4
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Before too long I hope to be able to provide a Java application I've written to a number of users.  The application will be available as a fat JAR and will be located on a network share so that many users can access it at the same time.

This will be the first time I've done this professionally so I have a few questions if anyone would be kind enough to answer them

* What's the best way to test to ensure that users can run the JAR?  If they simply double-click on it and it doesn't launch what's the best way to know what's gone wrong?  The people using it won't be Java developers.  My guess is that I should originally ask them to run it from the Command Prompt which will provide detail on any errors.  My application uses Spring so I'm guessing that if I use Log4J this would create a log file that would provide information on any launch errors?
* If any of you reading have been in the same situation how have you gone about releasing a JAR file for use?  Are there any tools that can be useful to use (apart from Maven which is what I'm using to create the fat JAR)?

 
Stephan van Hulst
Saloon Keeper
Posts: 7991
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I wanted to release an executable JAR for users that are not really tech savvy, I would release an installer for each platform that I want to release my JAR for. The installer can detect whether an appropriate JVM is already installed on the machine, and it could even offer to download and install a JVM if it's not installed yet. It could install the JVM system-wide, or it could just install it for your application. You might want to Google for tools that can easily generate such installers for your project.

Whether you go this route or not, you could also release shortcuts for different platforms that will call the applicable commands so that your users don't have to open up a command prompt and type the commands themselves.
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If all machines will always have a JRE installed (e.g. because it's installed by your company's IT department), you can also take a look at JNLP.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!