We're updating the issue view to help you get more done. 

bootloader can not properly handle cmd arguments that are not included in bootloader itself but the java land.

Description

Case 1:
./rvm -ea -Xmx100M SomeClass
The output is
vm: "-Xmx100M" is not a recognized Jikes RVM command line argument.

Case 2:
./rvm -jar some.jar -X:gc:verbose=3
bootloader output gc logs with level 3.
'-X:gc:verbose=3' should be passed as application args.

The cause of case 1 is that when bootloader encounter an unrecognized token, the code consider it application class name and stops handling the rest arguments by just copying them to Java arguments buffers(main.c:461-462). That's why '-Xmx100' is passed to java land, which should be handled in bootloader and never passed to javaland.

The cause of case 2 is obvious, bootloader does not consider '-jar some.jar' as the boundry between vm options and application arguments.

It seems a little cumbersome to identify every possible vm options in bootloader, see CommandLineArgs.java prefixes. I suggest the native code only identify what's should be handled here as well as the vm-application boundry.

Environment

all

Status

Assignee

Erik Brangs

Reporter

Linyu Zhu

Labels

None

External issue ID

None

Components

Fix versions

Affects versions

git tip

Priority

Medium