将文件格式与我的程序关联(Java)
我正在为我的FRC制作侦察软件(Java)机器人团队。侦察就像在比赛期间收集其他团队机器人的数据。我的程序使这个过程尽可能简单和容易是绝对重要的。我的程序可以通过两种方式保存其数据,其中一种是将 .scout 文件写入用户的硬盘驱动器。所有这些都运行良好,但作为最后的修饰,我想实现一种将 .scout 文件与我的程序关联起来的方法,以便使用我的程序打开 .scout 文件。它就像 Microsoft Word 的 .docx。它将 .doc/.docx/...etc 与其自身相关联,这样当用户单击具有这些扩展名的文件时,Word 会自行打开,然后打开用户单击的文件。我想要这样的东西用于我的应用程序。请记住,它是用 Java 编写的,适用于不同的操作系统(Windows、OSX、Ubuntu Linux 等)。
I am making Scouting Software (in Java) for my FRC robotics team. Scouting is like collecting data on other teams' robots during competition. It is absolutely critical that my program makes that process as simple and easy as possible. My program can save its data in two ways, one of which is by writing a .scout file to the user's hard drive. All this is working well, but as a finishing touch i would like to implement a way to associate .scout files with my program so that .scout files are opened with my program. It's like .docx for Microsoft Word. It associates .doc/.docx/...etc to itself such that when the user clicks on a file with those extensions, Word opens itself up and then opens the file the user clicked on. I want something like this for my application. Keep in mind, it is written in Java and meant to work on different operating systems (Windows, OSX, Ubuntu Linux, etc).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该程序有 GUI 吗?如果是这样,请使用 Java Web Start 启动它。
JWS 可以将文件类型与 Windows、OS X 和 Windows 上的应用程序关联起来。 *尼克斯。这是一个 演示。将
.zzz
文件类型与演示相关联的 JNLP API 文件服务。应用程序。Does the program have a GUI? If so, launch it with Java Web Start.
JWS can associate a file-type with an application on Windows, OS X & *nix. Here is a demo. of the JNLP API file service that associates the
.zzz
file type with the demo. app.