title: simple console Application using java
body: <p>Im developing a simple console Application using java. The code is given below</p>
  
  <pre><code>`   try {
              File file = new File("writer.txt");
              writer = new BufferedWriter(new FileWriter(file));
              Process myProcess = Runtime.getRuntime().exec("jps -l");
              BufferedReader stdout = new BufferedReader(new InputStreamReader(
                      myProcess.getInputStream()));
              String line = stdout.readLine();
              while (line != null) {
                  if (line.contains(".jar")) {
                      writer.write(line);
                      System.out.println(line);
                  }
                  line = stdout.readLine();
              }
              writer.close();
             }
  `    
  </code></pre>
  
  <p>The code will display the currently running the jar in my windows. The output format is displayed <code>2356 Timeout.jar</code> I want to display it only <code>Timeout.jar</code> How to remove that integer values. Thanks in advance.</p>