This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
If I run any Java program in my c:\java, I get the NoSuchMethodError for main. Somehow, main is not getting recognized at run-time. However, if I copy my Gary.java source program to c:\java\com\gfarms\geometry and add the following statement at the top of the file: package com.gfarms.geometry; then compile Gary.java in c:\java\com\gfarms\geometry and run it by saying: java com.gfarms.geometry.Gary it runs!!
Lay you odds that there is another Gary.class out there that does not have a main that is getting picked up from the classpath. When you don't SPECIFICALLY say which class file to run by using the package, the OTHER one gets run and you get an error.
"JavaRanch, where the deer and the Certified play" - David O'Meara