1

I know that are many questions regarding of getting OS level information, I came through almost all of them, but I did not find something related to the gpu. I used System.getProperties, Runtime class and System.getenv. Thank you! Edited: I search for a windows solution

Bogdan
  • 29
  • 5

1 Answers1

2

Try below code :

String line;
Process p = Runtime.getRuntime().exec("wmic PATH Win32_videocontroller GET description");
BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
while ((line = input.readLine()) != null) {
   System.out.println(line);
}
input.close();

Output on my computer:

Description
Intel(R) HD Graphics 520

Windows commands are

wmic PATH Win32_videocontroller GET description
wmic PATH Win32_videocontroller GET adapterram
wmic PATH Win32_videocontroller GET driverversion
wmic PATH Win32_videocontroller GET pnpdeviceid
Shashwat
  • 2,342
  • 1
  • 17
  • 33