Results 1 to 2 of 2

Thread: Jar File

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2003
    Posts
    10

    Jar File

    I have a Java source code in a form of an Executable Jar File. how can I get to the source code of this file? can I do it in Visual J++?
    and can anyone explain to me what is this JAR file
    tnx
    Last edited by Gal; Jul 27th, 2003 at 05:30 PM.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    I have a Java source code in a form of an Executable Jar File.
    I doubt it. You probably have java byte code in a jar file. If it was the source then the jar is not executable, unless it's both, which would be a waste.

    JAR (the Java ARchive) is a ZIP-derived compressed file format. It is exactly like ZIP with an added manifest file (which contains information about the file in a machine- and human-readable format, key-value pairs). The manifest file might for example specifiy the startup class when the jar file is "executed".

    You can use JAR for everything (Mozilla uses it for packaging components), but the original purpose was for packing up various .class and resource files for a Java application.



    Now, if you want the source code you must first unpackage the jar (using a tool like WinRAR or PowerArchiver, or your own written using the classes in java.util.jar) and then you'll have to decompile the bytecode files (.class). To do so you need a java decompiler (see the "javap" thread).
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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