Open WIth dialog in Java

前端 未结 1 1458
礼貌的吻别
礼貌的吻别 2020-12-12 01:11

I was wondering if there\'s a cross platform way to mimic the Windows Open With dialog from inside a Java Swing application. My application is an editor for elearning packa

1条回答
  •  囚心锁ツ
    2020-12-12 01:34

    I think that you may be able to do something with JDIC (Java Desktop Integration Components).

    https://jdic.dev.java.net/documentation/Examples.html

    Take a look at the package org.jdesktop.jdic.filetypes

    https://jdic.dev.java.net/nonav/documentation/javadoc/jdic/org/jdesktop/jdic/filetypes/package-summary.html

    Provides classes for associating applications with file types and accessing a registered file type association.

    Every desktop allows the user to view files with the associated applications. Usually a desktop comes with a registry that allows the user to associate applications with file types. An association includes information like a MIME type, file extensions, and actions that could be applied to the file type. By accessing the association information, the desktop could invoke the appropriate applications to handle a file, display an URL or send an email.

    0 讨论(0)
提交回复
热议问题