BUG: Bad default Start menu program in setup projects

SYMPTOMS

When you wrap a Visual J++ 6.0 application project in a self-extracting executable that has an entry on the Start menu and the Start menu is set to the default properties, the following error occurs when you try to run the program from the Start menu:
WJView Error
ERROR: Could not execute Form1: The system cannot find the file specified.

CAUSE

When you select the Create an entry in the Start Menu check box, the default properties for a self-extracting setup project are as follows:
Command line program=<WinDir>\wjview.exeArgument= /p /cp:p "<APPDIR>" Form1
The problem occurs because Visual J++ 6.0 does not modify the project's target start location to point to ProjectXX.exe. Visual J++ 6.0 should point to ProjectXX.exe if you specify Windows EXE as the project packaging type. The launch dialog box, as well as any setup project deploying this type of project, always refers to the startup class independent of the packaging type.

RESOLUTION

To make your setup project create an entry in the Start menu when Windows binaries are deployed, change the default setup properties as follows:
Command line program=<AppDir>\AppName.exeArgument=""
NOTE: AppName is the name of the Windows application. For example, Project1 is the application name in the example in the MORE INFORMATION section of this article.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start Visual J++ 6.0. In the New Project dialog box, click Windows Application to create a new Windows application project. Click Open. Project1 is created by default.
  2. In the Project Explorer window, right-click Project1, and click Project1 Properties....
  3. In the Project1 Properties dialog box, click the Deployment tab, select Windows Binaries in the Outputs of type list, and click OK.
  4. From the File menu, click New Project. In the New Project dialog box, expand the Visual Studio folder and click the Distribution Units folder. Click Self-Extracting Setup to create a new self-extracting setup project. Setup1 is created by default. Make sure that the location of Setup1 is the same as Project1, and click Add to current solution.
  5. In the Project Explorer window, right-click Setup1, click Add Project Outputs..., click Project1, and click OK.
  6. In the Project Explorer window, right-click Setup1, and click Setup1 Properties....
  7. On the Target tab in the Setup1 Properties dialog box, select the Create an entry in the Start Menu check box and click OK.

    NOTE: The default properties are set as follows:
    Command line program=<WinDir>\wjview.exeArgument= /p /cp:p "<APPDIR>" Form1
  8. In the Project Explorer window, right-click Solution and click Rebuild Solution to create Project1.exe and Setup1.exe.
  9. Go to the folder that contains Setup1.exe. Double-click Setup1.exe to install the program.
  10. Click Start, Programs, and Setup1.
RESULT: The error message occurs.

REFERENCES

For support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:

Propiedades

Id. de artículo: 199033 - Última revisión: 02/14/2017 - Revisión: 1

Microsoft Visual J++ 6.0 Edición estándar

Comentarios