Is Java not installed correctly? Exception in thread "main" java.lang.NoSuchMethodError
<p>Recently when I write any code and compile it, then try to run it I get this exception:</p>

<blockquote>
  <p>Exception in thread "main" java.lang.NoSuchMethodError</p>
</blockquote>

<p>At first I thought there is something wrong in my code, but I couldn't find anything wrong with it. When trying to run a <code>HelloWorld</code> example that had worked before, if works, but if I copy the exact same code into a file <code>HelloWorld2</code> I get this exception again.</p>

<p>The code is identical but when I used <code>javap</code> to decompile both class files I found a difference. In <code>HelloWorld</code> (the original file)</p>

<pre><code>"public static void main(java.lang.String[])";
</code></pre>

<p>and in <code>HelloWorld2</code> (the new one)</p>

<pre><code>"public static void main(String[])";
</code></pre>

<p>without <code>java.lang.</code>.</p>

<p>I recompiled the old <code>HelloWorld</code> with <code>javac</code> and now when I try to run it it doesn't work and I get the same exception. None of my old code now works if I recompile it.</p>

<p>I've searched everywhere but can't find a solution to this problem - any idea what is going on here?</p>
