[crac] RFR: Provide arguments for restore [v3]

Alexey Bakhtin abakhtin at openjdk.java.net
Thu Mar 3 15:50:35 UTC 2022


On Tue, 1 Mar 2022 12:13:26 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> This change adds a new API and implementation to receive a new set of command-line arguments in the restored Java instance. The supplied demo code shows a faster replacement for `javac`.
>> 
>> The current implementation obligates the first argument of the new set not to start with the dash, otherwise, the java launcher will interpret it as its own parameter. So the first argument should be a "verb" similar to the Main class.
>
> Anton Kozlov has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Rename to newArguments, add javax.crac mirror

src/java.base/share/classes/javax/crac/Core.java line 87:

> 85: 
> 86:     /**
> 87:      * Gets new arguments provided after restore.

May be description could be extended. I think it's worth mentioning that the new arguments do not replace original arguments, it is application-level arguments and it's application's responsibility to parse and apply these additional arguments. An empty array is returned in case of no additional arguments are provided.

-------------

PR: https://git.openjdk.java.net/crac/pull/16


More information about the crac-dev mailing list