JRE/JDK error launching the Gen DTU from the taskbar in Windows 11
search cancel

JRE/JDK error launching the Gen DTU from the taskbar in Windows 11

book

Article ID: 369339

calendar_today

Updated On:

Products

Gen - Workstation Toolset Gen

Issue/Introduction

When attempting to launch the Gen Diagram Trace Utility (DTU) via the taskbar (pinned to taskbar) in Windows 11, it fails with the following message: 

DiagramTrace Error

A Java Runtime Environment (JRE) or Java Development Kit (JDK)
must be available in order to run DiagramTrace.  No Java virtual machine
was found after searching the following locations:
C:\Program Files (x86)\CA\Gen86\Gen\dt\jre\bin\javaw.exe
javaw.exe in your current PATH

Environment

Gen 8.6
Windows 10, 11

Resolution

Referencing the Gen 8.6 program shortcuts folder "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\CA\Gen 8.6".
The shortcut "Diagram Trace Utility" has Target "C:\Program Files (x86)\CA\Gen86\Gen\DiagramTrace.bat" which puts %Gen86JRE%bin at the front of the PATH and then calls "%GEN86%gen\dt\DiagramTrace.exe".

In Windows 11 it is not possible to pin a shortcut to the taskbar by dragging it to the taskbar and only after the application has started can you right click on it and pin it to the taskbar.
Therefore instead of DiagramTrace.bat it is DiagramTrace.exe that is actually pinned to the taskbar. So when the DTU is started from there it is just trying to find javaw.exe from the PATH and it is not using %Gen86JRE%bin.

To access the DTU via the taskbar versus the Start Menu (or a Shortcut), users need to modify the system PATH environment variable and append %GEN86JRE%bin to the front of it. If a javaw.exe is already in the PATH other problems may occur if the %GEN86JRE%bin is not at the front and the wrong javaw.exe is used.

Additional Information

Support's testing:

  • Under Windows 10, it was not possible to pin a shortcut to a .bat file tor the .bat file itself to the taskbar i.e. right clicking on either does not offer that option and trying to drag either to the taskbar is disallowed ("no entry" sign on taskbar).
    From Googling there is a general limitation with .bat files and pinning.
    As a workaround can add "C:\Windows\System32\cmd.exe /c" in front of the shortcut''s Properties "Target" and then it can be dragged to the taskbar i.e. Target changed to:
    C:\Windows\System32\cmd.exe /c "C:\Program Files (x86)\CA\Gen86\Gen\DiagramTrace.bat"
  • Under Windows 11 the above workaround still does not allow the shortcut to dragged into the taskbar