Results 1 to 4 of 4
  1. #1
    JavaJunkie is offline Member
    Join Date
    Apr 2009
    Posts
    12
    Rep Power
    0

    Default Jar file is not interpreting

    Hi,

    I want to run my Jar file, but I'm getting an error.

    The error, which I'm getting is:

    Failed to load Main-Class manifest attribute from
    TicTacToe.jar


    I've created my Manifest file with name, Manifest.txt, and it has the following header information:

    Main-Class:Basic

    and I've created a Jar file with the command:

    Jar cfm TicTacToe.jar Manifest.txt *.class


    then why I'm getting the error?

    Thanks in advance.

  2. #2
    markw8500's Avatar
    markw8500 is offline Senior Member
    Join Date
    Jul 2008
    Location
    Pennsylvania, USA
    Posts
    136
    Rep Power
    0

    Default

    I think you want your Manifest to say:
    Main-Class:Basic.Main
    Who Cares... As Long As It Works...

  3. #3
    JavaJunkie is offline Member
    Join Date
    Apr 2009
    Posts
    12
    Rep Power
    0

    Default

    Quote Originally Posted by markw8500 View Post
    I think you want your Manifest to say:
    Main-Class:Basic.Main
    The problem is not yet solved.

    I tried that too, but yet getting the above exception.

    I try to run my jar file with command java -jar TicTacToe.jar.

    Is there anything I'm still missing?

  4. #4
    markw8500's Avatar
    markw8500 is offline Senior Member
    Join Date
    Jul 2008
    Location
    Pennsylvania, USA
    Posts
    136
    Rep Power
    0

    Default

    I dont have much practice with command line... But in order for me to get it to work, I had to put my classes in a folder, and the folder name had to be the package name of my app...
    Who Cares... As Long As It Works...

Similar Threads

  1. Replies: 2
    Last Post: 04-07-2009, 06:25 AM
  2. Replies: 0
    Last Post: 02-11-2009, 09:53 AM
  3. Help interpreting what a class is supposed to do
    By bornwithnoname in forum New To Java
    Replies: 2
    Last Post: 11-20-2008, 12:19 AM
  4. Replies: 7
    Last Post: 11-19-2008, 02:09 PM
  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
  •