Source Code : Using activation framework
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
Using activation framework
import javax.activation.CommandInfo;
import javax.activation.MailcapCommandMap;
public class MailcapCommandMapDemo1 {
public static void main(String[] args) {
MailcapCommandMap mailcapCommandMap = new MailcapCommandMap();
String[] mimeTypes = mailcapCommandMap.getMimeTypes();
for (String mimeType : mimeTypes) {
System.out.println(mimeType);
CommandInfo[] commandInfos = mailcapCommandMap.getAllCommands(mimeType);
for (CommandInfo info : commandInfos) {
System.out.println(" " + info.getCommandName() + " : "
+ info.getCommandClass());
}
}
}
}
/*image/jpeg
view : com.sun.activation.viewers.ImageViewer
image/gif
view : com.sun.activation.viewers.ImageViewer
text/*
view : com.sun.activation.viewers.TextViewer
edit : com.sun.activation.viewers.TextEditor
*/
Thank with us