public WindowsXP(){
  int procs=1;
  String info="";
  try {
    Runtime rt=Runtime.getRuntime();
    Process proc=rt.exec("cmd.exe /C echo %NUMBER_OF_PROCESSORS%");
    BufferedReader reader=new BufferedReader(new InputStreamReader(proc.getInputStream()));
    String numProcs=reader.readLine();
    proc=rt.exec("cmd.exe /C echo %PROCESSOR_IDENTIFIER%");
    reader=new BufferedReader(new InputStreamReader(proc.getInputStream()));
    info=reader.readLine();
    procs=Integer.parseInt(numProcs);
  }
 catch (  Exception e) {
  }
  m_processors=procs;
  m_cpuInfo=info;
}

public WindowsXP ( ) { int procs = 1 ; String info = "" ; try { Runtime rt = Runtime . getRuntime ( ) ; Process proc = rt . exec ( "cmd.exe /C echo %NUMBER_OF_PROCESSORS%" ) ; BufferedReader reader = new BufferedReader ( new InputStreamReader ( proc . getInputStream ( ) ) ) ; String numProcs = reader . readLine ( ) ; proc = rt . exec ( "cmd.exe /C echo %PROCESSOR_IDENTIFIER%" ) ; reader = new BufferedReader ( new InputStreamReader ( proc . getInputStream ( ) ) ) ; info = reader . readLine ( ) ; procs = Integer . parseInt ( numProcs ) ; } catch ( Exception e ) { } m_processors = procs ; m_cpuInfo = info ; }
create this instance of cpuparser and gather information from the windows xp system .
