Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding a Postpend to PATH feature in the MSI installer - (Was the MSI overrides klist.exe in system PATH) #560

Open
Trumeet opened this issue Sep 9, 2023 · 3 comments
Labels
enhancement New feature or request Windows

Comments

@Trumeet
Copy link

Trumeet commented Sep 9, 2023

Describe the bug
A clear and concise description of what the bug is.

C:\Users\yta>klist
Credentials cache C:\Users\yta\krb5cc_yta not found.

C:\Users\yta>C:\Windows\System32\klist

Current LogonId is 0:0x315613

Cached Tickets: (6)

#0>     ...

C:\Users\yta>where klist
C:\Program Files\Microsoft\jdk-17.0.8.101-hotspot\bin\klist.exe
C:\Windows\System32\klist.exe

TLDR: The klist.exe in OpenJDK takes higher priority than the system klist command.

Desktop (please complete the following information):

OS & version [e.g. Windows 10, 1822]: Windows 10, 22H2

MSFT Build of OpenJDK Version:

The output from java --version:

openjdk version "17.0.8.1" 2023-08-24 LTS
OpenJDK Runtime Environment Microsoft-8297089 (build 17.0.8.1+1-LTS)
OpenJDK 64-Bit Server VM Microsoft-8297089 (build 17.0.8.1+1-LTS, mixed mode, sharing)

To Reproduce:
Steps to reproduce the behavior:

  1. Install the MSI with admin rights, default options with add to JAVA_HOME
  2. Run klist
  3. CMD prefers the klist.exe in OpenJDK rather than C:\Windows\System32\klist.exe

Expected behavior
A clear and concise description of what you expected to happen.

The installed klist.exe should take lower priority than the Windows klist

Screenshots, Logs etc
If applicable, add screenshots, logs to help explain your problem.

Additional context
Add any other context about the problem here.

@karianna
Copy link
Member

@brunoborges & @gdams - I think this is the recurring pre-pend or post-pend to PATH challenge. Is there a short term workaround we can give to this user?

@brunoborges
Copy link
Member

The workaround is to edit PATH and move the Java folder to the end

@karianna karianna added the enhancement New feature or request label Sep 11, 2023
@karianna karianna changed the title The MSI overrides klist.exe in system PATH Consider adding a Postpend to PATH feature in the MSI installer - (Was the MSI overrides klist.exe in system PATH) Sep 11, 2023
@brunoborges
Copy link
Member

Hi @Trumeet, I believe if we make this change, you would still face this problem with any other JDK. We sure can evaluate changing in ours, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Windows
Projects
None yet
Development

No branches or pull requests

3 participants