首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >是否可以使用JavaFX将更多开始菜单项添加到程序中?

是否可以使用JavaFX将更多开始菜单项添加到程序中?
EN

Stack Overflow用户
提问于 2017-09-28 00:45:50
回答 1查看 244关注 0票数 16

我正在使用JavaFX Gradle plugin构建我的JavaFX应用程序。是否可以将多个开始菜单项添加到已完成的安装程序?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-09-30 14:31:31

在回答了你的other question regarding additional native launchers之后,我查看了JDK的源代码,看看这需要什么。

任何启用了"needMenu"-property的启动器都会反映在开始菜单中的某个菜单项中。只需在您的构建文件中添加类似以下内容:

代码语言:javascript
复制
jfx {
    // ... normal configuration ...

    // your secondary entry points, each will inherit the configuration, unless you specify otherwise here
    secondaryLaunchers = [
        [
            appName: 'somethingDifferent2',
            mainClass: 'your.different.entrypoint.MainApp',
            // the following is required for an start-menu entry
            needMenu: true
        ]
    ]
}

免责声明:我是这个JavaFX-Gradle-plugin的创建者

票数 10
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46453186

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档