• Post Reply Bookmark Topic Watch Topic
  • New Topic

check the parameters of standalone Java application  RSS feed

 
Steve Jiang
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to run a standalone java application with multiple optional paramters

Like

Java testApp -n updatebyName -i updatebyID -t updatebyType -u updatebyUser -.......

Is there direct fucntion we can use to check the paramter of testAPP?

Thanks
 
Campbell Ritchie
Marshal
Posts: 56518
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand the problem, I am afraid. Please explain a bit more.
 
Rob Spoor
Sheriff
Posts: 21131
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's no direct function; you'll need to parse the arguments. You can do that manually, or use a CLI parser library. I believe that the Apache Commons project has one such library.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!