我的程序关联的文件格式(JAVA) [英] Associate file format with my program (Java)

查看:159
本文介绍了我的程序关联的文件格式(JAVA)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在侦察软件(在Java中)我的 FRC 机器人团队。童军就像是比赛中收集其他队的机器人的数据。这绝对是至关重要的,我的程序使该过程简单容易越好。我的节目可以以两种方式,其中之一是通过写入一个.scout文件到用户的硬盘驱动器保存其数据。所有这一切运作良好,但作为点睛之笔我想实现的方式文件,以便.scout文件与我的程序打开关联.scout与我的计划。这就像.DOCX为Microsoft Word。它关联.DOC / .DOCX / ...等,以本身,这样当用户点击这些扩展名的文件,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).

推荐答案

方案是否有一个GUI?如果是这样,与 Java Web Start的的启动。

Does the program have a GUI? If so, launch it with Java Web Start.

JWS可以将文件类型与Windows,Mac OS X和放大器的应用程序相关联; * nix中。这里是一个演示。那与演示的 .zzz 文件类型关联的JNLP文件API服务。应用程序。

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.

这篇关于我的程序关联的文件格式(JAVA)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆