I have cmd like this one:
java Test -p 127.0.0.1:8080 -d D:\Desktop\temp.exe -o mingw -s 1024 -t 2000
I want to get the args with -p
,-d
or -s
(exclude -p
,-d
,-s
itself), and discard other args.
I tried hours but had no result,is there any one can help me?
I tried the arg[i] and arg[i+1] way,but if args like this:-p -d xxx, the user do not enter -p value, this solution will take no effect and cause problems.