Mime-Type for .jar file?

A

Andrew Thompson

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?
 
M

Michael Borgwardt

Andrew said:
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.
 
A

Andrew Thompson

"Michael Borgwardt" ...
Andrew Thompson wrote: .... ...
It would be different from the widely used "application/java-archive".

I will use that one instead.
 
T

Thomas Weidenfeller

Michael said:
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
 
A

Andrew Thompson

"Thomas Weidenfeller" ...
....
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top