Feat (parser): handle javaagent and verbose args

This commit is contained in:
Duy Tran Khanh 2023-01-29 20:05:59 +07:00 committed by GitHub
parent 4716e99df1
commit 328581c2a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -437,7 +437,7 @@ public class JREUtils {
ArrayList<String> parsedArguments = new ArrayList<>(0);
args = args.trim().replace(" ", "");
//For each prefixes, we separate args.
String[] separators = new String[]{"-XX:-","-XX:+", "-XX:","--", "-D", "-X"};
String[] separators = new String[]{"-XX:-","-XX:+", "-XX:","--", "-D", "-X", "-javaagent:", "-verbose"};
for(String prefix : separators){
while (true){
int start = args.indexOf(prefix);