I want to pass arguments to a java application, but as a linux application style.
The main method in java uses the String array for all parameters. On Linux, most applications accept parameters such as: ls -l --color
-l for list style output
--color is for coloring output
I want to find a code snippet for parsing a String array of a main method, such as a linux application.
I want to do something like this: java -jar myapp.jar -d arg1 --arg2
I can do it, but I donβt have time. So, if someone has the code to do this, better.
source share