I have an application that some of my users run from Eclipse, and others run it by using a jar file.
I want some actions to be done when running from within the jar,
Another approach is putting information in the manifest file, and testing for if that information is available at runtime.
If it is, then the code was started with "-jar". Otherwise it was started in another way, e.g. directly from Eclipse.