Results 1 to 6 of 6
  1. #1
    lgpublic is offline Member
    Join Date
    Apr 2010
    Posts
    3
    Rep Power
    0

    Default ClassNotFoundException

    Hi,
    I use a open source package in my program. The package is in a jar file. I use -classpath to import the jar file when compiling it and it works well. But when I execute it I meet the ClassNotFoundException exception and the class not found is the class in that jar file. I set the classpath environment variable and it seems working well. However, when I pack my program into jar file, I meet the exception again. This time I cannot figure how to make it run successfully. Any ideas?

  2. #2
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    What IDE do you use?

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,120
    Rep Power
    20

    Default

    What does the MANIFEST look like in your jar file?

  4. #4
    lgpublic is offline Member
    Join Date
    Apr 2010
    Posts
    3
    Rep Power
    0

    Default

    Quote Originally Posted by Webuser View Post
    What IDE do you use?
    Well, I didn't use any IDE. Just gedit.

  5. #5
    lgpublic is offline Member
    Join Date
    Apr 2010
    Posts
    3
    Rep Power
    0

    Default

    Quote Originally Posted by Tolls View Post
    What does the MANIFEST look like in your jar file?
    Wow, there is no MANIFEST. I will try it again.

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,120
    Rep Power
    20

    Default

    And the MANIFEST will say where the other jar should be deployed (usually relative to your app's jar)...as well as the main class. Which begs the question of how you managed to run it? It contains the name of the main class file.

Similar Threads

  1. ClassNotFoundException with Applet and new JRE
    By marrra in forum Java Applets
    Replies: 3
    Last Post: 06-22-2010, 12:13 PM
  2. ClassNotFoundException
    By Edward in forum New To Java
    Replies: 2
    Last Post: 06-29-2009, 08:08 PM
  3. ClassNotFoundException JSP
    By TDMaster in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 03-27-2009, 08:41 AM
  4. ClassNotFoundException
    By Chezelle in forum Java Applets
    Replies: 5
    Last Post: 12-24-2008, 05:26 PM
  5. Replies: 0
    Last Post: 07-09-2008, 01:36 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •