As I have seen your code there is no main method in SimpleDotCom class which is there in SimpleDotComTest.java. So, to run SimpleDotCom program
you should have main method within that class then and then only JVM will come to know where should it has to start program execution.
Now, regarding game class I think that you are running downloaded or ready made code. Here, if your files are in Bin folder of JDK. But there is no package structure defined for your class that's why this error comes that package "helper" does not exist. You should put your classes in helper directory.
Thanks
James
raj david wrote:Hi,
Apologies I will get familar with the tools available, I don't know how to do this yet.
I am coding in the following way....
C:\Sun\SDK\JDK\bin>javac SimpleDotComTestDrive.java
above complies but when I do the following
C:\Sun\SDK\JDK\bin> java SimpleDotCom
output shows as...
hit
failed
C:\Sun\SDK\JDK\bin>java SimpleDotCom
above complies but when I do the following
C:\Sun\SDK\JDK\bin> java SimpleDotCom
then this message is showing...
exception in thread "main" java.lang.NoSuchMethodError: main
But if I do Game one, which is
C:\Sun\SDK\JDK\bin>javac Game.java
then I get this error...
Game.java:1: package helpers does not exist
import helpers.GameHelper;
^
Thanks