java - 在 Java 中打开 WIth 对话框

标签 java

我想知道是否有一种跨平台的方法可以从 Java Swing 应用程序内部模拟 Windows 打开方式对话框。我的应用程序是电子学习包的编辑器,其中一位用户希望能够在应用程序内用他们选择的编辑器打开内容文件,资源通常是 HTML 文件、图像、css、javascript,但可以是任何类型可以在浏览器中运行的内容。谢谢

最佳答案

我认为您可以使用 JDIC(Java 桌面集成组件)做一些事情。

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

查看包 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.

关于java - 在 Java 中打开 WIth 对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1238991/

相关文章:

java - 如何在 Spring Bean 中获取 Mules Logger 实例?

java - "java decompiler"JD-Core 0.6.0/JD-GUI 0.3.3反编译代码含义

java - 计划任务问题

java - 对元素使用 Switch 而不是 if/elseif

java - 使用 StreamTokenizer () 、 HashMap() 、 HashSet() 计算词频。在Java核心中

java - 根据给定的参数,JVM 使用多少物理内存?

java - Kotlin 内联函数是否比 Java 匿名类便宜?

java - 加快数据库插入速度

java - 如何在自定义适配器 Android Studio Java 中将标签设置为行

java - 无法将库添加到 Eclipse 中的 xtext 项目(返回错误)