Results 1 to 5 of 5

Thread: jar file execution error.

  1. #1

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    jar file execution error.

    Hi all,

    I have try to create a jar file using jar command as follows.

    Code:
    jar cf my-jar-file all-input-files
    It create a jar file only, there is no manifest file. When I execute the my-jar-file it says that,

    Failed to load Main-Class manifset attribute from my-jar-file

    Anybody have an idea why is that.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: jar file execution error.

    You need to specify your main class using a manifest file
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  3. #3

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Re: jar file execution error.

    Can you explain a little how can I do it.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

  4. #4
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: jar file execution error.

    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  5. #5

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Re: jar file execution error.

    Yes pal, on the same document I refer and stuck with on it.

    I'll explain it a little. All the issues comes with the loading images. After build the project, jar file created in the dist folder of the project. Actually dist folder has jar file as well as a folder named lib.

    In my project simply I can refer correct folder to image and it is ok. Then after execution of the jar file, any of the image not loaded. Then what I have done is extract the jar file.

    There create two folders, one is META-INF and the other is name with my project. After extracting and referring that folder I can execute the jar file.

    I think now it is clear to you. Any idea why is that.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width