In Java, is there a way to obtain the command line parameters even if main() didn't save them?
- by Uri
We have a program with a main() that parses certain CLPs but does not save them anywhere.
I then have my own plug-in code that needs access to the original CLPs (so I can transmit more parameters) for it. However, I cannot change main()
I saw that there is apparently a way to do this in C#, I'm looking for an equivalent Java solution on Linux.
UPDATE: Obviously, I'm aware of how main() works. Unfortunately, I cannot change the existing application or the way it is invoked (except for CLPs). I can only access via a sandboxed plugin code. My question is whether there is a way to get the command line (rather then the environment variables with -D) that the JVM was invoked with.