Mime-Type for .jar file?

Discussion in 'Java' started by Andrew Thompson, Jan 30, 2004.

  1. Is there a correct 'mime-type' to identify
    a java jar file?

    Somebody using Mozilla commented they
    got the literal bytecodes in their browser,
    when they followed a likn to a jar at the
    on-line compiler.

    I began to investigate mime-types,
    because you need to get your server
    to identify .jnlp files using a mime-type..

    After trawling around Sun and getting
    nowhere (I could gind mime-type for
    applet and jnlp only), I started
    experimenting.

    Using the one for applet does not work,
    you just get a blank screen then referred
    to Sun (Java was already installed). So
    hen I got silly and just adapted my own..
    application/x-java-application

    This results in Mozilla asking you what
    you want to use to open the jar file.

    My question is, are there any really
    compelling reasons _not_ to define
    this mime type? Have I missed
    something obvious?

    --
    Andrew Thompson
    * http://www.PhySci.org/ Open-source software suite
    * http://www.PhySci.org/codes/ Web & IT Help
    * http://www.1point1C.org/ Science & Technology
    Andrew Thompson, Jan 30, 2004
    #1
    1. Advertising

  2. Andrew Thompson wrote:
    > My question is, are there any really
    > compelling reasons _not_ to define
    > this mime type? Have I missed
    > something obvious?


    It would be different from the widely used "application/java-archive".
    Though I cannot find this in the JAR specs, it seems to be the
    standard MIME type for JAR archives.
    Michael Borgwardt, Jan 30, 2004
    #2
    1. Advertising

  3. "Michael Borgwardt" ...
    > Andrew Thompson wrote:

    ....
    > > compelling reasons _not_ to define
    > > this mime type?

    ...
    > It would be different from the widely used "application/java-archive".


    I will use that one instead.
    Andrew Thompson, Jan 30, 2004
    #3
  4. Michael Borgwardt wrote:
    > It would be different from the widely used "application/java-archive".
    > Though I cannot find this in the JAR specs, it seems to be the
    > standard MIME type for JAR archives.


    It is used often, but it is not registered with IANA:

    http://www.iana.org/assignments/media-types/index.html

    One also often sees

    application/x-jar

    which would be "more correct" according to MIME type naming rules (the
    "x" indicates a non-registered MIME type). I think I also saw
    application/x-java-jar a few times.


    /Thomas
    Thomas Weidenfeller, Jan 30, 2004
    #4
  5. "Thomas Weidenfeller" ...
    > Michael Borgwardt wrote:
    > > It would be different from the widely used "application/java-archive".

    ....
    > application/x-jar
    >
    > which would be "more correct" according to MIME type naming rules (the
    > "x" indicates a non-registered MIME type). I think I also saw
    > application/x-java-jar a few times.


    Did a quick (crude) Google ..hits
    1420 application/java-archive
    549 application/x-jar
    9 application/x-java-jar

    On the basis of 'most popular' over
    'most correct' I am sticking with
    java-archive ..for the moment.

    --
    Andrew Thompson
    * http://www.PhySci.org/ Open-source software suite
    * http://www.PhySci.org/codes/ Web & IT Help
    * http://www.1point1C.org/ Science & Technology
    Andrew Thompson, Jan 30, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CJ
    Replies:
    1
    Views:
    1,552
    Andrew Thompson
    Oct 29, 2004
  2. Arnold Peters
    Replies:
    0
    Views:
    554
    Arnold Peters
    Jan 5, 2005
  3. muttley
    Replies:
    0
    Views:
    2,689
    muttley
    Oct 20, 2005
  4. cyberco
    Replies:
    4
    Views:
    3,728
    Roedy Green
    Feb 14, 2006
  5. Arnold Peters
    Replies:
    0
    Views:
    639
    Arnold Peters
    Jan 5, 2005
Loading...

Share This Page