How to create local variable that throws exception? Java : <p>I am trying to create a new object in my main class, however, the class the object is referencing throws alot of IOExceptions.  I know this is simple, but I just can't figure out the syntax to create this local variable.  Please help</p>

<pre><code>public static void main(String[] args) { 

     ProcessBuilderExample start2 = new ProcessBuilderExample();
</code></pre>

<p>Dr Java is giving me the error "Object must be caught or thrown"</p>

<p>I tried this...</p>

<pre><code>public static void main(String[] args) { 

         ProcessBuilderExample start2 = new ProcessBuilderExample() throws IOException;
</code></pre>

<p>I get an error from this too.  How do I declare this?</p>
