Currently I run my program like this:
java program arg1 arg2 arg3...
There are a variable number or arguments. Is there some BASH script or something I can package with my program to allow me to r开发者_如何学编程un it just like
program arg1 arg2 arg3
and continue to allow me to have variable arguments.
I just care about Unix systems.
I'm sorry for this simple question: I'm a Java developer, not a BASH scriptor.
Here:
#!/bin/bash
java program "$@"
Or if you want the bash to exit when java is called, use this:
#!/bin/bash
exec java program "$@"
(This replaces the bash
process with the java
process instead of waiting until java
returns.)
Just use an alias:
alias program='java program'
精彩评论