![]() If however, you want to display your application's icon in the dock it will be necessary to export the resource from the jar so that it might be read by the Java runtime during relaunch. As a result, the Dock will display the default Java coffee cup. ![]() If a null is supplied to the applicationIcon argument, then the Java launch command string will not include the -Xdock:icon= argument and parameter. In order to have some flexibility setting the dock icon is optional. Don't use this as an argument for your app if you use this class.) and so execution proceeds to the first half of the method where the relaunch command is built and executed. The first time this method is called, the flag -XdockSet will not be found ( rather should not be found. Checking for this flag is therefore the first step in the process. ![]() This is achieved by means of a flag prepended to the jar file argument list upon completion of the first half of the method code. While looking at this code the first thing to note is that this method behaves as if it were a recursive method, and while it doesn't call itself directly, it performs a kind of inter-process recursion and as such needs a stop condition. */ public static void main( String args) ![]() Private static final String APPLICATION_ICON = " /resources/app-icon.png" Copy Code private static final String APPLICATION_NAME = " Menu bar & dock demo"
0 Comments
Leave a Reply. |