How do I turn my java program into a command line utility on linux? -


i've written small command line app in java on ubuntu using intellij idea. i'm compiling project jar file can execute using

java -jar myapp.jar arg1 arg2 arg3 etc 

i run app this:

myapp arg1 arg2 arg3 

how can achieve this? , how can others whom send app can use same way?

define alias (if want permanent bash define in .bash_aliases in home directory):

alias myapp="java -jar myapp.jar" 

and run command like:

myapp arg1 arg2 arg3 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -