Click to See Complete Forum and Search --> : Problem with java program!


lincoln6288
12-18-2007, 01:40 AM
Hi. I am trying to run this tic tac toe program in jcreator.
http://archive.devx.com/sourcebank/details.asp?resourceNum=1030632

The program builds fine however every time I try to run it, it gives me this error:
java.lang.NoSuchMethodError: main
Exception in thread "main"
Process completed.

this also has happened with a couple of the other tic tac toe programs too. Does anyone know why this is happening?

I appreciate any help.
Thank you

nspils
12-18-2007, 09:03 AM
The Board class does not have a main method. Go to the "Home URL" link - you need to get the TicTacToe.java file and the ComputerPlayer.java file (which DOES have a main method) as well as the Board file in order to build the complete system.

lincoln6288
12-19-2007, 12:37 AM
Thank you very much for the help. I took your advice and was able to get the program to run.

by the way do you kno of anywhere that has a tic tac toe program that is less advanced than this one?

Hack
12-19-2007, 07:11 AM
Have a look at these.

http://rintintin.colorado.edu/~epperson/Java/TicTacToe.html

http://www.newnavy.us/games/tictactoe.htm