检测我的 JavaFX 程序打开的文件
Detect the file my JavaFX program was opened with
为我的应用程序制作安装程序后,我可以将其与文件扩展名相关联,这很棒,但我不知道如何检测打开我的程序的文件路径。
感谢您的帮助!
对于遇到此问题的任何人,文件路径是 getParameters().getRaw()
中的第一个参数
函数的 Javadoc 描述。
Retrieves a read-only list of the raw arguments. This list may be empty, but is never null. In the case of a standalone application, it is the ordered list of arguments specified on the command line. For named parameters, each <name,value> pair is represented as a single argument of the form: "--name=value".
谢谢,James_D!
为我的应用程序制作安装程序后,我可以将其与文件扩展名相关联,这很棒,但我不知道如何检测打开我的程序的文件路径。 感谢您的帮助!
对于遇到此问题的任何人,文件路径是 getParameters().getRaw()
函数的 Javadoc 描述。
Retrieves a read-only list of the raw arguments. This list may be empty, but is never null. In the case of a standalone application, it is the ordered list of arguments specified on the command line. For named parameters, each <name,value> pair is represented as a single argument of the form: "--name=value".
谢谢,James_D!