title: Java error "Value of local variable is not used"
body: <p>I am really new to java (started learning 2 days ago). Sorry if this is a stupid question. I am trying to learn how to use rt.exec &amp; similar methods so I tried to make a very simple program which runs calc.exe. This is the code:</p>
  
  <pre><code>public class main {
  {
  try {
  Runtime rt = Runtime.getRuntime() ;
  Process p = rt.exec("calc.exe") ;
   }
  
  catch(Exception exc){/*handle exception*/}
      }
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/fgM6k.png" alt="http://i.stack.imgur.com/KrpsT.png"></p>
  
  <p>I get the error " The value of local variable p is not used".</p>
  
  <p>And if I try to compile this is what I get:</p>
  
  <p><img src="https://i.stack.imgur.com/Ryllw.pngI" alt="http://i.stack.imgur.com/Ryllw.pngI"></p>
  
  <p>I think it's easy to fix but I don't know how. Would be nice if someone helped.</p>