Saturday, November 1, 2014

Run a jar file in command line

This is a very simple and short post on running a jar file in command line.
Simplest command that you can try is
java –jar [jarFileName].jar

But you may need to have the MANIFEST file in the jar to run it simply with the above command.

So how to bundle MANIFEST.MF to your jar?

You can add the following maven plugin to your pom.xml and get it done. Remember to add the main class name of your app here.

How to run the jars with external dependencies?

If you need to use the simple command java –jar [jarFileName].jar to run your application which has external dependencies, you can bundle the dependencies you need to the executable jar itself. Again use the below maven plugin to get it done.

The highlighted part is doing this for you and the part above is to bundle MANIFEST.MF file to that jar file too.


  1. Which is the best product among those listed in this site?
    Best Computer Gaming Chair

  2. This article is really helpful for me. I am regular visitor to this blog. Share such kind of article more in future. Personally i like this article a lot and you can have a look at my services also: I was seriously search for a Salesforce training institutes in ameerpet which offer job assistance and Salesforce training institutes in Hyderabad who are providing certification material. It's worth to join Salesforce training institutes in India because of their real time projects material and 24x7 support from customer desk. You can easily find the best Salesforce training institutes in kukatpally kphb which are also a part of Pega training institutes in hyderabad. This is amazing to join Data science training institutes in ameerpet who are quire popular with Selenium training institutes in ameerpet and trending coureses like Java training institutes in ameerpet and data science related programming coures python training institutes in ameerpet If you want HCM course then this workday training institutes in ameerpet is best for you to get job on workday.

  3. How to get free spins no deposit bonus on Casino Sites
    The first pcie 슬롯 thing that is needed 트 위치 룰렛 to make a deposit 룰렛사이트 is to make your 텍사스 홀덤 룰 first deposit with your new account. Once you've finished your registration bet 분석 you can deposit cash into your new

  4. High RTP slot machines are the most sought-after on line casino games of USA players. Regardless of the various themes, layouts, and bonus features, the return to participant proportion clearly signifies which titles payout more cash. We consideration to} real Las Vegas on line casino games, made by the best slot machine makers. You 솔카지노 can play brand new games from Vegas on-line casinos, without spending real cash. No need to deposit funds, or sign-up, these are real real cash on line casino slots that you could play for free. This mythological game wins players' hearts time after time for good reasons.