本文介绍了为什么我不能在 Netbeans 8.2 中创建新的 grails 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

操作系统:Windows 10
JDK:jdk1.8.0_65
IDE:Netbeans 8.2

我采取的步骤:
1.我已经安装了Netbeans,选择ALL一栏,表示可以支持Groovy或者grails应用.
2. 我还安装了最新版本的 Grails,grails-3.3.5.
3. 安装完所有东西后,我打开了 Netbeans.

我在 NETBEANS 中采取的步骤
文件 > 新建项目 > Groovy > Grails 应用程序 > 然后我点击了下一步.
之后,我单击了配置 Grails... 按钮.然后我将 grails 主目录的文件路径(在我的例子中是 C:Program FilesNetBeans 8.2grails-3.3.5)复制粘贴到 Grails Home 然后点击确定.

这里的问题是我无法创建新项目.它一直显示此消息框:创建应用程序时发生意外错误.有关详细信息,请参阅输出窗口."
并在那里显示错误:指定应用程序名称或使用 --inplace 在当前目录中创建应用程序"



我该怎么办?请帮我.我的工作申请考试需要这个.非常感谢.

解决方案

我在 Windows 10 上的 NetBeans 8.2 中创建 Grails 3.3.5 项目时遇到与您完全相同的错误.这是因为 NetBeans 中的一个长期存在的错误:

选项 2:使用 NetBeans 9 的测试版.

    • 以与在 NetBeans 8.2 上相同的方式定位 Grails 3.3.5(工具 > 选项 > 杂项 > Groovy > Grails 主页).
    • 然后,您可以使用 Groovy > Grails 应用程序 项目向导成功创建您的 Grails 应用程序,并运行它:

    OS: Windows 10
    JDK: jdk1.8.0_65
    IDE: Netbeans 8.2

    Steps I had taken:
    1. I had installed Netbeans, selecting the ALL column, meaning it can support Groovy or the grails application.
    2. I also had installed the latest version of Grails which is the grails-3.3.5.
    3. After installing everything, I opened Netbeans.

    STEPS I HAD TAKEN IN NETBEANS
    File > New Project > Groovy > Grails Application > then I clicked next.
    After that I had clicked the Configure Grails... button. Then I copy pasted the file path of my grails home directory (in my case that is C:Program FilesNetBeans 8.2grails-3.3.5) under the textbox of Grails Home then clicked on OK.

    The problem here is that I cannot create a new project. It kept on displaying this message box: "Unexpected error occured while creating the application. See output window for more details."
    And there it shows the error: "Specifiy an application name or use --inplace to create an application in the current directory"



    What should I do? Please help me. I need this for my job application's exam. Thank you so much.

    解决方案

    I get exactly the same error as you when creating a Grails 3.3.5 project in NetBeans 8.2 on Windows 10. This is because of a longstanding bug in NetBeans: Bug 258407 - Error when creating a Grails 3.1.x project, which also impacts more recent releases of Grails.

    Although that bug has Status: VERIFIED FIXED, unfortunately the fix was not applied to release 8.2 itself ("...this bug is fixed in development builds not 8.2"). You have two possible workarounds:

    • Install a DEV build of NetBeans 8.x which contains the fix.
    • Install the beta release of NetBeans 9.0 which contains the fix.

    Option 1: Using a DEV release of NetBeans

    • Download the most recent nightly Dev build of NetBeans 8.2.
    • Activate Groovy and locate Grails 3.3.5 in the same way as you did on NetBeans 8.2.
    • You can then successfully create your Grails application using the Groovy > Grails Application project wizard, and run it:

    Option 2: Using a beta release of NetBeans 9.

    • Download and unzip NetBeans 9 beta from the Apache NetBeans 9.0 Beta web site.
    • Start NetBeans 9 beta and install the Groovy/Grails plugin:
    • Locate Grails 3.3.5 in the same way as you did on NetBeans 8.2 (Tools > Options > Miscellaneous > Groovy > Grails Home).
    • You can then successfully create your Grails application using the Groovy > Grails Application project wizard, and run it:

    这篇关于为什么我不能在 Netbeans 8.2 中创建新的 grails 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 01:13