0

I have this code but i don't know to display in jList or jTable

This code i have still println

try {
  Process sysProcess = Runtime.getRuntime().exec(new String[] { "wmic", "product", "get", "name",",","version" });
  BufferedReader streamReader = new BufferedReader(new InputStreamReader(sysProcess.getInputStream()));

  Scanner sc = new Scanner(sysProcess.getInputStream());
  String line = sc.nextLine();

  while((line=streamReader.readLine())!=null) {                
    System.out.println(line);
    }
  }
catch (Exception e) {
    System.err.println(e.getMessage());
    }
help-info.de
  • 6,695
  • 16
  • 39
  • 41

0 Answers0