Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Mime-Type for .jar file?

Reply
Thread Tools

Mime-Type for .jar file?

 
 
Andrew Thompson
Guest
Posts: n/a
 
      01-30-2004
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


 
Reply With Quote
 
 
 
 
Michael Borgwardt
Guest
Posts: n/a
 
      01-30-2004
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.

 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      01-30-2004
"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.


 
Reply With Quote
 
Thomas Weidenfeller
Guest
Posts: n/a
 
      01-30-2004
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

 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      01-30-2004
"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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments