Is there a way in Java to identify if the program is being triggered from the command prompt?
I know when a C# program is triggered from CMD, it sets RUN_FROM_CMD
environment variable to TRUE
and can be identified using the below line of code, but the same does not work in Java.
Environment.GetEnvironmentVariable("RUN_FROM_CMD")
Please Suggest a way, if there is any.