How to detect that a VM was started with --enable-preview ?
forax at univ-mlv.fr
forax at univ-mlv.fr
Tue Oct 9 15:47:28 UTC 2018
Ah, sorry,
i mean detecting if the VM was started with --enable-preview when you are running a code on that VM.
Basically, i want to programmatically know if i can generate and load a class with the minor version equals to 65535 on that VM or not ?
cheers,
Rémi
----- Mail original -----
> De: "Seán Coffey" <sean.coffey at oracle.com>
> À: "Remi Forax" <forax at univ-mlv.fr>, "core-libs-dev" <core-libs-dev at openjdk.java.net>
> Envoyé: Mardi 9 Octobre 2018 17:27:41
> Objet: Re: How to detect that a VM was started with --enable-preview ?
> would `jcmd <pid> VM.info | grep jvm_args:` help ? or `jcmd <pid>
> VM.command_line`
>
> regards,
> Sean.
>
> On 09/10/2018 16:20, Remi Forax wrote:
>> Hi all,
>> it seems that there is no simple way* to detect if a VM is started with
>> --enable-preview or not ?
>>
>> Rémi
>> * apart using JMX to sniff the VM command line with
> > ManagementFactory.getRuntimeMXBean().getInputArguments()
More information about the core-libs-dev
mailing list