How do I create a desktop shortcut icon to launch my program?


The key is to make sure that CLASSPATH is set correctly to include $ISCOBOLlibiscobol.jar and the directories and/or jar files where your COBOL programs and resources are located.

You can manually change CLASSPATH in the Environment Variables screen of your system's settings. Then you can make a desktop shortcut to "isrun PROGNAME", "javaw PROGNAME", etc.

You can also create an executable jar file. (See "How can I package my application and execute it in a JAR file? (veryant.com)")

For end-user deployment you can use an installer technology such as install4j or InstallShield to set the CLASSPATH variable correctly.

A less elegant method for use during development is to create a .bat or .cmd file with SET CLASSPATH= before the isrun command line.
And then make a desktop shortcut to the batch file you created.
This method has the side-effect of displaying a command prompt window in the background when you run the program.
You can set the shortcut to run with the window minimized (i.e. only the command prompt window starts as minimized).



Article ID: 35
Created: August 31, 2009
Last Updated: May 25, 2022
Author: Support KB Author

Online URL: https://support.veryant.com/phpkb/article.php?id=35