Results 1 to 3 of 3
  1. #1
    marlon9472 is offline Member
    Join Date
    Apr 2011
    Posts
    2
    Rep Power
    0

    Default Exception in thread "main" java.lang.NoClassDefFoundError: client Caused by: java.lan

    guys i'm gettin a message that is saying

    Exception in thread "main" java.lang.NoClassDefFoundError: client
    Caused by: java.lang.ClassNotFoundException: client
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: client. Program will exit.
    Press any key to continue . . .


    please help when im try to play a sever for a game

  2. #2
    miss_peaches is offline Member
    Join Date
    Apr 2011
    Posts
    15
    Rep Power
    0

    Default

    You have to locate exactly where the .class file is saved in your computer. For instance in order to compile a code, I have to type in c:\program files\java\jdk1.6.0_24\bin\javac NameOfApp.java. You'll have to do this everytime. Hope it helps

  3. #3
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    469
    Rep Power
    6

    Wink

    Read this good article about compiling and running your java program : Hello World

    And also, look at the common compiler problems: Compiler Problems

    Hope that helps,

    Goldest
    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

Similar Threads

  1. Replies: 12
    Last Post: 06-06-2012, 10:04 AM
  2. Replies: 5
    Last Post: 06-02-2010, 02:05 PM
  3. Replies: 3
    Last Post: 06-01-2010, 04:01 PM
  4. Replies: 1
    Last Post: 04-02-2009, 10:50 PM
  5. Replies: 6
    Last Post: 08-18-2008, 07:44 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
  •