Results 1 to 10 of 10
  1. #1
    wrap23 is offline Member
    Join Date
    Sep 2008
    Posts
    5
    Rep Power
    0

    Default No Class Def Found Error:

    Yes, I am currently in coding of a Runescape private server. I am very new and have obsulutely no idea what I am doing when it comes to errors such as these. When I attempt to run my client for the server, it comes up with a command prompt, No Class Def Found Error: Client. So, I go to a different server, and run the specified client for it, and the command prompt this time says, No Class Def Found Error: EGUI.
    What do I do?

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,516
    Rep Power
    25

    Default

    we need to see all of what you entered and the response.
    Please copy and paste it all here.
    Also explain where the class files are (in a jar or where)
    Do you have any doc for the program? Does it say how to execute the program?

  3. #3
    wrap23 is offline Member
    Join Date
    Sep 2008
    Posts
    5
    Rep Power
    0

    Default

    It says I can't post images or links or images untill I have 20 posts or more. I'll just type out the problem.
    Exception in thread "main" java.lang.NoClassDefFoundError: client
    Caused by: java.lang.ClassNotFoundException: client
    at java.net.URLClassLoad$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.Launder$AppClassLoader.loadClass<Unknown Source>
    at java.lang.ClassLoader.loadClassInternal<Unknown Source>
    Press any key to continue . . .

  4. #4
    wrap23 is offline Member
    Join Date
    Sep 2008
    Posts
    5
    Rep Power
    0

    Default

    To start the client, you either need to start by config.bat that opens up a command prompt along with the client to connect with the server, to show all errors when occured at the time. Or, use Startup.jar just to load up the client to connect with the server.

  5. #5
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,516
    Rep Power
    25

    Default

    we need to see all of what you entered
    You left off the command line that you entered.
    Also explain where the class files are (in a jar or where)
    Where are the class files for the program?

    I don't think there are restrictions on pasting into the "Reply" window. Prefer that to an image as it can be seen and worked with easier.

    The error message says it can't find the class named client. Can you see a file named client.class on a disk or in a jar file?

  6. #6
    wrap23 is offline Member
    Join Date
    Sep 2008
    Posts
    5
    Rep Power
    0

    Default

    Quote Originally Posted by Norm View Post
    You left off the command line that you entered.

    Where are the class files for the program?

    I don't think there are restrictions on pasting into the "Reply" window. Prefer that to an image as it can be seen and worked with easier.

    The error message says it can't find the class named client. Can you see a file named client.class on a disk or in a jar file?
    I can't post images yet, I don't have enough posts. It says I need 20 or more. The class files for the server side are in a folder. And no I can't find a client.class. The client and server is hosted on a dedicated which is on a forum. I don't actually own the server, or have coded the server, I just have this error when I attempt to run the client. There is no command entered, just the startup.jar file that runs the client to connect to the server to play. When I use the config.bat isntead of Startup.jar, it brings up a command prompt to show any errors or reasons why Startup.jar won't start up the client. It then shows that error, and the client doesn't start up, so I'm guessing there is something wrong with my Java Virtual Machine. I have deleted a file called svchost.jar that was on my Start>AllPrograms>Startup>svchost.jar. I'm wondering if that is my problew.

  7. #7
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,516
    Rep Power
    25

    Default

    You are running the client program on your computer. To run, it MUST have class files on your PC.
    Without the full text of the java command that is entered and the error message that is generated it is very hard to figure out what is wrong.
    Since you don't understand java, you need to contact whoever wrote the program and get them to explain what is wrong and what you need to do to get the program to work.
    You haven't given us enough information to be able to help.
    We need:
    the full text of the command that was entered.
    The full text of the error message.
    A listing of the contents of either the folders holding the class files or the contents of the jar file holding the class files.

  8. #8
    wrap23 is offline Member
    Join Date
    Sep 2008
    Posts
    5
    Rep Power
    0

    Default

    I would post a link to the download so you can see how to run the program. It's ran by a .Jar file, not ran by entering a command inside a command prompt.
    I can't post a link, I don;t have enough posts. And, that was the full error entered,

  9. #9
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,516
    Rep Power
    25

    Default

    it's ran by a .Jar file,
    I assume you mean that you click on and open the .jar file to start the application.

    Here's how to get some of what we need:
    Open a command prompt
    Change directory cd to the folder with the .jar file
    Enter: java -jar <jarfilename>
    Then copy and paste all of wht is on the screen -> click icon in upper left corner of command prompt window, chose Edit and chose Select all. The window goes white. Again icon, Edit and Copy.
    Now paste that here.

    Rename the .jar file to .zip and open the file. You will see the contents of the jar/zip file. Open and copy the contents of the manifest file and post it here. Look at the Main-Class: entry in the manifest file. What follows it? That is the name of the class that starts the app. Is that class in the jar file?

    Rename the .zip back to .jar

  10. #10
    jason wang is offline Member
    Join Date
    Sep 2008
    Posts
    16
    Rep Power
    0

    Default

    I think that you don't include the necessary lib in your source code.
    I met this situation before, most of them are this reason. So you can check that whether that lib include in your source code.

Similar Threads

  1. Error: no class definition found
    By toby in forum New To Java
    Replies: 6
    Last Post: 08-28-2011, 10:32 PM
  2. Class not found Exception
    By surendra in forum Java Servlet
    Replies: 8
    Last Post: 06-09-2011, 12:52 PM
  3. JRE rtapplet class not found error
    By avinash.natekar in forum Java Applets
    Replies: 11
    Last Post: 04-02-2009, 08:02 AM
  4. symbol not found error
    By rmartyce in forum New To Java
    Replies: 1
    Last Post: 05-23-2008, 05:58 AM
  5. Error: javax.servlet.ServletException: Column not found
    By barney in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 08-07-2007, 07:20 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
  •