I am interested in a mechanism in Java SE that would allow library code to identify the running application. Such a mechanism could take a form of a static method like
java.lang.System.getApplicationName()
returning the fully qualified name of the application's main class. The mechanism would be expected to work in all deployment modes: standalone, applet, webstart.
This is currently needed by JavaFX WebView, see https://javafx-jira.kenai.com/browse/RT-29584, and so does not have to be public API at least initially.