get java.io.File's mimeType

hi everybody!

I would like to know how I can get the mimeType from a java.io.File.

Thanks!

Regars

[123 byte] By [sweeea] at [2007-11-27 11:30:20]
# 1

It might help to read the API for the classes that contain "mime" or "mimetype" or "filetype" directly in the classname.

masijade.a at 2007-7-29 16:33:11 > top of Java-index,Java Essentials,Java Programming...
# 2

A simple google search gives:

http://www.rgagnon.com/javadetails/java-0487.html

kajbja at 2007-7-29 16:33:11 > top of Java-index,Java Essentials,Java Programming...
# 3

Thanks for your responses!!

I'm using jdk 1.5 and the compiler doesn't recognize the javax.activation.MimetypesFileTypeMap class. Can I use it with jdk 1.5?

Regards

sweeea at 2007-7-29 16:33:11 > top of Java-index,Java Essentials,Java Programming...
# 4

Did you read the page? Have you downloaded the activation jar? Do you have it on you classpath?

kajbja at 2007-7-29 16:33:11 > top of Java-index,Java Essentials,Java Programming...
# 5

Sorry kajbj,

Forget what I've said, please!

Thanks

sweeea at 2007-7-29 16:33:11 > top of Java-index,Java Essentials,Java Programming...