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 2 of 2

Thread: Exporting to an Excutable Jar

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default [SOLVED]Exporting to an Excutable Jar

    I am having a problem with exporting to a jar file. It is really frustrating because I have other files that have been exported the same way that work fine. But here is my problem. I can run my problem fine in Eclipse. It works great. Now, I want to share it with the world (or a few friends), however I am having problems doing this.

    It gives me the error: "Could not find the main class: GameLogic.Chess. Program will now exit"

    This is what I have tried. Looking at the MAINFEST.MF file inside the jar. It looks like this:

    Manifest-Version: 1.0
    Class-Path: .
    Main-Class: GameLogic.Chess
    So that looks right. I have reinstalled Eclipse and Java. I have taken the Jar and put it on another computer and it ran fine, but when I took it to another machine that was imaged from the other one it got the same error I am receiving. (weird)

    I have tried the plug-in fatjar and I get the same result.

    I have taken the program apart and commented everything out but the JFrame. Still doesn't work. I don't know what to try next. So I figured I would try to ask a community if they knew about anything else I could try.

    Thanks,

    KeyLay
    Last edited by KeyLay; November 28th, 2011 at 08:18 PM. Reason: Solved


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

    Default Re: Exporting to an Excutable Jar

    This thread has been cross posted here:

    http://www.java-forums.org/new-java/51934-exporting-excutable-jar.html

    Although cross posting is allowed, for everyone's benefit, please read:

    Java Programming Forums Cross Posting Rules

    The Problems With Cross Posting


Similar Threads

  1. Exporting Data to Excel Spreadsheet
    By PineAppleKing in forum Java Theory & Questions
    Replies: 5
    Last Post: May 19th, 2011, 03:03 PM
  2. Replies: 1
    Last Post: April 21st, 2011, 09:59 AM