Put version to my java application - Netbeans

前端 未结 3 1785
轮回少年
轮回少年 2021-02-08 15:07

Is there any way that i can give a version number to my application in netbeans.And then access that version number inside my code.

Something similar to the Assembly num

3条回答
  •  被撕碎了的回忆
    2021-02-08 15:45

    In my JavaFX app created in Netbeans, I can set the build version (Implementation version) in the Project Properties window shown here:

    This number is then used everywhere, for example it is automatically inserted into the filename of the installer. It is also the number retrieved by this.getClass().getPackage().getImplementationVersion(); mentioned by the accepted answer.

提交回复
热议问题