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" <[email protected]> > À: "Remi Forax" <[email protected]>, "core-libs-dev" > <[email protected]> > 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()
