Problem with java program!


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Problem with java program!

  1. #1
    Join Date
    Dec 2007
    Posts
    5

    Problem with java program!

    Hi. I am trying to run this tic tac toe program in jcreator.
    http://archive.devx.com/sourcebank/d...rceNum=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

  2. #2
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    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.

  3. #3
    Join Date
    Dec 2007
    Posts
    5
    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?

  4. #4
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. Java book
    By Lou in forum Java
    Replies: 9
    Last Post: 09-19-2007, 06:58 AM
  2. problem in program in c++
    By mheasen in forum Architecture and Design
    Replies: 0
    Last Post: 03-20-2002, 10:24 AM
  3. Replies: 0
    Last Post: 11-19-2001, 01:11 AM
  4. Replies: 0
    Last Post: 11-13-2001, 09:07 PM
  5. Re: VB vs. Visual Age for Java
    By JJ in forum Enterprise
    Replies: 1
    Last Post: 07-06-2000, 05:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center