How to add arguments to a Java application
<p>I want to add arguments to my Java application before i run it. I want to be able do somthing like:</p>

<pre><code>public static void main(String args[])
{
    String document = args[0];
    new DocumentViewer(document);
}
</code></pre>

<p>I want to do somthing like when you click on a Word document it opens up the document by itself, you dont have to open word and then click open. Does anyone know how to add arguments? All relevant answers are appriciated!</p>
