File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes I/O and Streams and the fly likes MimetypesFileTypeMap method getContentType Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "MimetypesFileTypeMap method getContentType" Watch "MimetypesFileTypeMap method getContentType" New topic

MimetypesFileTypeMap method getContentType

Rob Qas
Ranch Hand

Joined: Apr 10, 2006
Posts: 34
dear all,

i am trying to get the MIME content type of file using

and i got

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport
at avax.activation.MimetypesFileTypeMap.<init>(

can anyone help please..

Joe Ess

Joined: Oct 29, 2001
Posts: 8839

Have a look here. Sounds like classpath conflicts can be the cause.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
It is sorta covered in the JavaRanch Style Guide.
subject: MimetypesFileTypeMap method getContentType
Similar Threads
Want to download .doc file from mysql
How to make sure a file is a valid text file.
error : upload excel file
problem in image File format
Delete file when the file downloaded.