How to get the "main" class?
David Holmes
david.holmes at oracle.com
Tue Mar 13 20:50:53 PDT 2012
Hi Eric,
On 14/03/2012 3:49 AM, Eric Caspole wrote:
> Is there a way via JVMTI or system property or anything to get the
> "main" class name of a Java application? We could use this to report the
> app name in a nicer way, rather than concatenating the whole java
> command line, for example.
Not that I can think of. The very existence of a main class is a
function of the launcher not the VM. It is the launcher that creates the
VM, loads the main class and then executes main(). The VM plays no
direct role.
David Holmes
> Thanks,
> Eric
>
>
More information about the hotspot-runtime-dev
mailing list