Results 1 to 6 of 6

Thread: JAR File Help

  1. #1
    Join Date
    Dec 2013
    Posts
    16
    Rep Power
    0

    Default JAR File Help

    Any idea how to fix this problem below I can not load my jar file and it is telling me it can not find the main and I thought I had the right files in the right spots. Do I need the .class of my main file for it to make the jar file. I do not understand If I need to make a .jar out of the main then add all the other files to create the jar. Any help will be great thanks.


    added manifest
    adding: Board.class(in = 2431) (out= 1371)(deflated 43%)
    adding: Cell.class(in = 1702) (out= 959)(deflated 43%)
    adding: Mark.class(in = 1195) (out= 673)(deflated 43%)
    adding: Outcome.class(in = 960) (out= 538)(deflated 43%)
    adding: Player.class(in = 832) (out= 472)(deflated 43%)

    TacToeGUIGame.jar
    Error: Could not find or load main class TicTacToeGUIGame

  2. #2
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,871
    Rep Power
    5

    Default Re: JAR File Help

    The jar is missing a required class file. Don't make it any more difficult than it needs to be.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    Join Date
    Dec 2013
    Posts
    16
    Rep Power
    0

    Default Re: JAR File Help

    It is harder seems like I have a class named BoardTester that will not compile yet any ideas? I have been looking the code over and only found that I thought I might not need it for the project. Thanks for the help maybe I found the problem.

  4. #4
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,871
    Rep Power
    5

    Default Re: JAR File Help

    Any ideas? Fix the code of course.

    And no, the problem is that you need a file TicTacToeGUIGame.class; the jar is expecting that class to be the actual starting point of the application. And since you're missing one class, you may be missing more too.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  5. #5
    Join Date
    Dec 2013
    Posts
    16
    Rep Power
    0

    Default Re: JAR File Help

    That is crazy because I have all the classes I need to run the program in my IDE but I can not make a working jar. So You mean I should add that class also as part or all the other classes I add. Thanks I will try that GImBal2 Thanks for your help you may have saved my day!

  6. #6
    Join Date
    Dec 2013
    Posts
    16
    Rep Power
    0

    Default Re: JAR File Help

    I just did what you said and created the file all looks good meaning all the files are in the jar but I got this Error Icon. "A java Exception has Occurred"

    Any body ever come across this error?

Similar Threads

  1. Replies: 0
    Last Post: 12-31-2013, 05:46 AM
  2. Replies: 15
    Last Post: 02-16-2012, 03:43 PM
  3. Replies: 6
    Last Post: 12-01-2010, 05:31 AM
  4. Replies: 0
    Last Post: 02-11-2009, 09:53 AM
  5. Replies: 7
    Last Post: 05-23-2008, 03:46 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
  •