有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java检测打开JavaFX程序时使用的文件

在为我的应用程序安装了一个安装程序之后,我可以让它与一个文件扩展名关联,这很好,但我不知道如何检测程序打开时使用的文件的路径。 感谢您的帮助


共 (1) 个答案

  1. # 1 楼答案

    对于任何有这个问题的人来说,文件路径是^{}中的第一个参数

    函数的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".

    谢谢你,詹姆斯