DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  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,649
    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, 05:58 AM
  2. problem in program in c++
    By mheasen in forum Architecture and Design
    Replies: 0
    Last Post: 03-20-2002, 09:24 AM
  3. Replies: 0
    Last Post: 11-19-2001, 12:11 AM
  4. Replies: 0
    Last Post: 11-13-2001, 08:07 PM
  5. Re: VB vs. Visual Age for Java
    By JJ in forum Enterprise
    Replies: 1
    Last Post: 07-06-2000, 04:50 AM

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links