title: How to get the name of a Java program?
body: <p>I'm creating an application that could be either an <code>.exe</code> or a <code>.jar</code> and I need to know which it is. Does anyone know how I can get the file name/extension of a program running in Java please? I can get the path of the program running but I can't get the name.</p>