Page 1 of 2 12 LastLast
Results 1 to 20 of 23
  1. #1
    Based Elliott is offline Member
    Join Date
    Mar 2014
    Posts
    11
    Rep Power
    0

    Default Need Help (Sorry to post another thread) - My Jar is not working

    I got my code into a jar, but when I run it I get his message:

    Need Help (Sorry to post another thread) - My Jar is not working-0aaedfaac1af930446b5c19e8be4da53.png

    I just used Eclipse to make my jar and I thought I did it right but I guess not. Thank you in advance.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,903
    Rep Power
    25

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    Use utility program that can read zip files and look inside the jar file to see if the file can be read without errors.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    Based Elliott is offline Member
    Join Date
    Mar 2014
    Posts
    11
    Rep Power
    0

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    Quote Originally Posted by Norm View Post
    Use utility program that can read zip files and look inside the jar file to see if the file can be read without errors.
    A utility program like what? I'm sorry, I'm not sure what a utility program is to begin with.

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,903
    Rep Power
    25

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    Ok. Try this then: Rename the jar file by adding .zip to the end of the name (for example: TheFileNAME.jar.zip) and double click on it. The OS will use its utility program to open the file.
    If you don't understand my response, don't ignore it, ask a question.

  5. #5
    Based Elliott is offline Member
    Join Date
    Mar 2014
    Posts
    11
    Rep Power
    0

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    I'm not sure how I can change the file type like that. Just renaming it of course does nothing.

    Sorry to bother you.

  6. #6
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,903
    Rep Power
    25

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    Just renaming it of course does nothing.
    Renaming doesn't change the contents. It does change what program the OS will use to open the file.

    What happened when you added the .zip and double clicked on the file?
    If you don't understand my response, don't ignore it, ask a question.

  7. #7
    Based Elliott is offline Member
    Join Date
    Mar 2014
    Posts
    11
    Rep Power
    0

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    I got the same error message that I've been getting.

  8. #8
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,903
    Rep Power
    25

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    I got the same error message that I've been getting.
    Not very likely. The java program should NOT be called when you double click on a zip file.

    Do you know how to rename a file? That is really very basic knowledge that you need to have to do programming.
    If you don't understand my response, don't ignore it, ask a question.

  9. #9
    Based Elliott is offline Member
    Join Date
    Mar 2014
    Posts
    11
    Rep Power
    0

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    Right click and then rename right? I'm sorry, I'm still beginning to learn to program and the required skills.

  10. #10
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,903
    Rep Power
    25

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    What happened after the rename and the double click?
    If you don't understand my response, don't ignore it, ask a question.

  11. #11
    Based Elliott is offline Member
    Join Date
    Mar 2014
    Posts
    11
    Rep Power
    0

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    I got the same error message I've been getting.

  12. #12
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,903
    Rep Power
    25

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    Not likely. I don't think the java program has anything to do with zip files.

    Are you sure you renamed the file?
    Open a command prompt window, change to the folder with the file and enter the dir command to show what is in the folder.

    To copy the contents of the command prompt window:
    Click on Icon in upper left corner
    Select Edit
    Select 'Select All' - The selection will show
    Click in upper left again
    Select Edit and click 'Copy'

    Paste here.
    If you don't understand my response, don't ignore it, ask a question.

  13. #13
    Based Elliott is offline Member
    Join Date
    Mar 2014
    Posts
    11
    Rep Power
    0

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    C:\Users\Christopher\Desktop\Help>dir
    Volume in drive C has no label.
    Volume Serial Number is 4491-7378

    Directory of C:\Users\Christopher\Desktop\Help

    03/04/2014 09:34 PM <DIR> .
    03/04/2014 09:34 PM <DIR> ..
    03/04/2014 07:24 PM 1,054 Formula.zip.jar
    1 File(s) 1,054 bytes
    2 Dir(s) 181,234,999,296 bytes free

    C:\Users\Christopher\Desktop\Help>

  14. #14
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,903
    Rep Power
    25

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    The .zip needs to be at the end not in the middle. Rename the file so the .zip is at the end of the filename:
    Formula.jar.zip
    If you don't understand my response, don't ignore it, ask a question.

  15. #15
    Based Elliott is offline Member
    Join Date
    Mar 2014
    Posts
    11
    Rep Power
    0

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    How?

  16. #16
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,903
    Rep Power
    25

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    Find someone that knows how to use the OS you have and have them help you.
    If you don't understand my response, don't ignore it, ask a question.

  17. #17
    Based Elliott is offline Member
    Join Date
    Mar 2014
    Posts
    11
    Rep Power
    0

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    I am really sorry to have wasted your time sir, thank you and have a good night :D

  18. #18
    typedef is offline Member
    Join Date
    Feb 2014
    Posts
    52
    Rep Power
    0

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    I'd like to take a crack at helping if your still willing to guide him through part of the help process Norm.

    If your running Windows 7 do the following.
    If you don't know if your running Windows 7 click start --> right-click on computer --> click properties.

    Now onward. Enable your file extensions. Check this link out on how to do that: Show or hide file name extensions - Microsoft Windows Help
    After you've done that go the the jar file. Click on it. press F2 this is a hotkey for renaming.
    Delete the name and rename it to theName.zip.

    If all goes well please continue onward Norm.

    EDIT: As for a zip program try the free 7zip: http://www.7-zip.org/
    Download the 32-bit version (can't go wrong here).
    A zip utility program allows you to view zip archives as well as make zip archives. Why zip archives at all? Compression! Compression makes your file or group of files smaller on your hard drive so that you may send them to other people quicker over the internet or neatly in one small file. So instead of grouping files within a folder you can group them in a zip archive (which is like a folder) for ease of transportation.
    How does this relate to jar files? Jar files are zip files that compress with a different method than normal zip files. Basically a zip format made by Oracle (the ones who manage the Java language).
    Last edited by typedef; 03-05-2014 at 07:08 AM.

  19. #19
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,786
    Blog Entries
    7
    Rep Power
    21

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    Quote Originally Posted by typedef View Post
    How does this relate to jar files? Jar files are zip files that compress with a different method than normal zip files.
    That is not entirely true: a .jar file is a .zip file, but it can also contain a MANIFEST entry that controls the behaviour of the JVM; if there is no such entry, there is no difference between a .jar file and a .zip file. Note that the MANIFEST entry is an ordinary entry as far as any zip utility is concerned.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  20. #20
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,369
    Rep Power
    6

    Default Re: Need Help (Sorry to post another thread) - My Jar is not working

    Quote Originally Posted by typedef View Post
    Jar files are zip files that compress with a different method than normal zip files. Basically a zip format made by Oracle (the ones who manage the Java language).
    Can you prove that?

    (tip: you cannot, so why say it as if you can?)
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 10
    Last Post: 11-23-2013, 07:47 PM
  2. HTTP Post working with WCF webservice
    By harshal82 in forum Advanced Java
    Replies: 0
    Last Post: 09-03-2010, 07:36 PM
  3. Thread Stop() method not working
    By charan reddy in forum Threads and Synchronization
    Replies: 18
    Last Post: 10-03-2009, 04:01 PM
  4. Replies: 3
    Last Post: 05-04-2009, 04:15 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
  •