I frequently ran into this issue when setting up a new system where you would 
have manually set env variables if the install location of Visual Studio was 
different or it was using VS2026 (which is not officially supported, but works 
for development).

This approach is simpler, detects more installations, automatically filters out 
incompatible ones, and is future proof in terms of new versions.

For testing, removing any VS env vars and deleting the 
build/windows_tools.properties file, should make this logic trigger

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

-------------

Commit messages:
 - Add comment
 - Use vswhere.exe

Changes: https://git.openjdk.org/jfx/pull/2330/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2330&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8393078
  Stats: 14 lines in 1 file changed: 1 ins; 2 del; 11 mod
  Patch: https://git.openjdk.org/jfx/pull/2330.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/2330/head:pull/2330

PR: https://git.openjdk.org/jfx/pull/2330

Reply via email to