How to determine from within Java which .NET platform is installed

In my Java program, I want to determine which .NET Framework is installed on the system. What is the best (and easiest) way to do this?

Answer Thank you scubabbl! He worked to check the directory System.getenv( "WINDIR" ) + "\\Microsoft.NET\\Framework"for his directories, starting with the letter "v".

+3
source share
2 answers

From what I understand, the actual file structure in c: \ windows \ Microsoft.Net \ Framework has folders with .Net versions. On my computer, I have folders up to v3.5, or with:. \ Windows \ Microsoft.Net \ Framework \ v3.5

There are many problems with this, including security issues.

The second, and probably best answer is to check your Windows registry.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework\NDP

, .

: stackoverflow java. / Windows Java

http://www.trustice.com/java/jnireg/ .

+5

- . , .

0

Source: https://habr.com/ru/post/1697562/


All Articles