Results 1 to 4 of 4
  1. #1
    mbschultz97 is offline Super OP Noob
    Join Date
    May 2014
    Location
    Virginia
    Posts
    65
    Rep Power
    0

    Default How do I make a jar?

    Hello, I'm done with my project and I'm not trying to make it into a jar with JGrasp... I start by making a project then I click the option to make my project into a jar... Everything works but when I try to run it it says that the main class cannot be found... How can I fix this? thanks!

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: How do I make a jar?

    Look in the jar file and see if it has all the files and records that are needed to be executable.
    a zip file utility can be used to read the contents of a jar file.

    See the tutorial for details: http://docs.oracle.com/javase/tutorial/deployment/jar/
    Last edited by Norm; 05-12-2014 at 05:58 PM.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    mbschultz97 is offline Super OP Noob
    Join Date
    May 2014
    Location
    Virginia
    Posts
    65
    Rep Power
    0

    Default Re: How do I make a jar?

    Quote Originally Posted by Norm View Post
    Look in the jar file and see if it has all the files and records that are needed to be executable.
    a zip file utility can be used to read the contents of a jar file.

    See the tutorial for details: Lesson: Packaging Programs in JAR Files (The Java™ Tutorials > Deployment)
    because it uses Jsoup do I have to add the Jsoup jar? Also is there anything in the code I need to change?
    Last edited by mbschultz97; 05-12-2014 at 06:26 PM.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: How do I make a jar?

    I thought you were working on this problem:

    main class cannot be found

    That will have to be fixed before the code in the jar will be executed.
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Replies: 2
    Last Post: 10-31-2012, 05:31 PM
  2. Replies: 4
    Last Post: 07-23-2011, 09:08 PM
  3. how to make .exe
    By vibaviattigala in forum New To Java
    Replies: 4
    Last Post: 07-22-2011, 11:07 PM
  4. how do i make a jar to an exe?
    By jack13580 in forum New To Java
    Replies: 23
    Last Post: 12-19-2010, 05:15 AM
  5. Trying to make a bot
    By ighor10 in forum New To Java
    Replies: 4
    Last Post: 04-10-2010, 04:29 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
  •