Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: How to make executable (.jar) file from a big project?

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How to make executable (.jar) file from a big project?

    I'm making a game in eclipse that uses only built in libraries like awt, swing, util, etc
    In this project I also use some images that I've already added their folder in the java build path
    Then I went to export -> java -> jar file and in the next window I've let it this way:



    But when I try to run the .jar file I got the following error:

    qhtY3pq.png

    What is causing this error? how to make a final executable file from a big project containing many packages, etc?
    Thanks
    Attached Images Attached Images
    Last edited by anon176; June 20th, 2014 at 11:33 AM. Reason: image was too small


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: How to make executable (.jar) file from a big project?

    Moved to IDE section.

    Try opening the jar file in a zip utility to see if it has problems.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    May 2012
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How to make executable (.jar) file from a big project?

    It contains all the files:


  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: How to make executable (.jar) file from a big project?

    That does NOT look like the contents of an executable jar file.

    I don't use an IDE to create my jar files so I can not help you. I use the jar command from a batch file.
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: How to make executable (.jar) file from a big project?

    I went to export -> java -> jar file
    Try choosing "Export -> Java -> Executable Jar File"

  6. #6
    Junior Member
    Join Date
    May 2012
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How to make executable (.jar) file from a big project?

    Tried too, didn't work, but got a different error: the program simply doesn't open. Doesn't show that error pop up that appeared before.

  7. #7
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: How to make executable (.jar) file from a big project?

    To see the error message, open a command prompt window, change to the directory with the jar file and enter the command:
    java -jar THEJARFILENAMEHERE.jar
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. FILE INPUT STREAM NOT WORKING ON EXECUTABLE JAR FILE
    By newtolearningjava in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 27th, 2014, 10:53 AM
  2. How to make an executable .jar file?
    By bdennin in forum What's Wrong With My Code?
    Replies: 5
    Last Post: June 11th, 2013, 05:22 PM
  3. [SOLVED] no sound from executable jar file
    By cl2606 in forum What's Wrong With My Code?
    Replies: 17
    Last Post: June 8th, 2011, 06:41 PM
  4. Jar Executable File
    By The_Mexican in forum What's Wrong With My Code?
    Replies: 43
    Last Post: June 23rd, 2010, 03:53 PM