简体   繁体   English

Netbeans “创建新的 C++ 项目” 完成按钮,没有任何反应

[英]Netbeans “create new C++ project” Finish button, nothing happens

I did a fresh install of Netbeans 7.0.1 (with C++ pack).我全新安装了 Netbeans 7.0.1(带有 C++ 包)。 I want to create a new project and after filling in the required fields and pressing on 'Finish', it blinks one time and then nothing happens at all.我想创建一个新项目,在填写必填字段并按“完成”后,它会闪烁一次,然后什么也没有发生。

在此处输入图像描述

Anyone has a solution found on this?有人对此有解决方案吗? As you can see, my OS is Windows 7.如您所见,我的操作系统是 Windows 7。

I had the same problem, and the log showed a warning and an exception when the project folder was created (see below).我遇到了同样的问题,创建项目文件夹时日志显示警告和异常(见下文)。 Indeed, changing the project folder solved the problem.事实上,更改项目文件夹解决了这个问题。

Warning:
WARNING [nativeexecution.support.logger]: [2197 ms.] Default tmp dir [C:\Users\PPATRI~1.MET\AppData\Local\Temp\] has spaces/non-latin chars in the path. It is recommended to use a path without spaces/non-latin chars for tmp dir. Either change TEMP environment variable in System Properties or use -J-Djava.io.tmpdir=c:\tmp to change the temp dir.

Exception:

org.openide.filesystems.FileStateInvalidException
    at org.netbeans.modules.masterfs.filebasedfs.fileobjects.RootObjWindows.createFolder(RootObjWindows.java:208)
    at org.netbeans.modules.masterfs.filebasedfs.fileobjects.RootObj.createFolder(RootObj.java:258)
    at org.openide.filesystems.FileUtil.createFolder(FileUtil.java:865)
    at org.netbeans.modules.cnd.makeproject.MakeProjectGeneratorImpl.createProjectDir(MakeProjectGeneratorImpl.java:355)
    at org.netbeans.modules.cnd.makeproject.MakeProjectGeneratorImpl.createProject(MakeProjectGeneratorImpl.java:182)
    at org.netbeans.modules.cnd.makeproject.ui.wizards.NewMakeProjectWizardIterator.instantiate(NewMakeProjectWizardIterator.java:504)
    at org.netbeans.modules.cnd.makeproject.ui.wizards.NewMakeProjectWizardIterator.instantiate(NewMakeProjectWizardIterator.java:395)
    at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1046)
    at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:617)
    at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:426)
    at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:252)
    at org.openide.loaders.TemplateWizardIteratorWrapper$ProgressInstantiatingIterator.instantiate(TemplateWizardIteratorWrapper.java:180)
    at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1566)
    at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1521)
    at org.openide.WizardDescriptor.access$1800(WizardDescriptor.java:139)
[catch] at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2134)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1411)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1991)

The same problem occurred for me, changing the project folder location solved the issue.我也遇到了同样的问题,更改项目文件夹位置解决了这个问题。 But while changing I came to know that window were making the project folder read-only automatically.但是在更改时,我知道 window 正在自动将项目文件夹设为只读。 So thats why the issue is coming up.所以这就是问题出现的原因。 And its windows 7 bug and not netbeans bug !!及其 windows 7 错误而不是 netbeans 错误!

Create a new folder and check its properties, you will see that it is read-only.创建一个新文件夹并检查其属性,您将看到它是只读的。 Microsoft says its because your user account is corrupted.For removing the bug, either you have to make a new user account with admin rights and use that or replace OS.微软说这是因为您的用户帐户已损坏。要删除该错误,您必须创建一个具有管理员权限的新用户帐户并使用该帐户或更换操作系统。 Just google how to solve the bug.只是谷歌如何解决这个错误。

I got this error to happen in Fedora 17我在 Fedora 17 中发生了这个错误

I'm using Java version 1.7.0_25我正在使用 Java 版本1.7.0_25

How to reproduce如何重现

  1. Open netbeans.打开 netbeans。 Choose File -> New Project.选择文件 -> 新建项目。
  2. Select C/C++ -> C++ Application Select C/C++ -> C++ 应用
  3. Click next.点击下一步。 You get this screen.你得到这个屏幕。 Click FINISH.单击完成。在此处输入图像描述
  4. Nothing happens.什么都没发生。 You see the error happen in lower right.您会看到错误发生在右下方。
  5. Close the new C/C++ Application window and click the red error icon.关闭新的 C/C++ 应用程序 window 并单击红色错误图标。 You get this:你得到这个:

在此处输入图像描述

  1. Clicking on "Show Details" you get a mountain of netbeans code guts spewed all over.单击“显示详细信息”,您会看到一大堆 netbeans 代码胆量到处喷涌而出。
  2. Netbeans IDE Bug? Netbeans IDE 错误? So how do we fix it?那么我们该如何解决呢?

SOLUTION 1, delete the .netbeans ide configuration directory SOLUTION 1、删除.netbeans ide配置目录

The problem is some kind of inconsistency in your .netbeans ide configuration folder.问题是您的.netbeans ide 配置文件夹中存在某种不一致。 One way to fix it is to stop netbeans, delete that directory, then restart netbeans.修复它的一种方法是停止 netbeans,删除该目录,然后重新启动 netbeans。 The .netbeans directory will be re-created and set to defaults. .netbeans目录将被重新创建并设置为默认值。

Steps:脚步:

  1. Close netbeans.关闭 netbeans。
  2. Make a copy of all your critical programs you want to keep.制作一份您想要保留的所有关键程序的副本。 Make a copy of your .netbeans ide configuration folder.复制您的.netbeans ide 配置文件夹。
  3. Delete the /home/el/NetbeansProjects directory where netbeans stores your programs.删除 netbeans 存储程序的/home/el/NetbeansProjects目录。
  4. Delete the /home/el/.netbeans directory which has configuration info for the IDE.删除包含 IDE 配置信息的/home/el/.netbeans目录。
  5. Start Netbeans.启动 Netbeans。 It will be as if it was started new for the first time and everything will work.就好像它是第一次开始新的一样,一切都会奏效。

SOLUTION 2, open netbeans as different user.解决方案2,以不同的用户打开netbeans。

Opening netbeans as a new user will create a new .netbeans folder.以新用户身份打开 netbeans 将创建一个新的.netbeans文件夹。 And works for same reason as above.并且出于与上述相同的原因而工作。

Walkthrough:演练:

  1. First you need to know how to run netbeans on the terminal, find out like this:首先你需要知道如何在终端上运行netbeans,如下所示:
  2. Right click my Application launcher -> Edit applications.右键单击我的应用程序启动器 -> 编辑应用程序。
  3. Locate the Netbeans icon launcher for netbeans.找到 netbeans 的 Netbeans 图标启动器。 Click edit点击编辑
  4. The run field says /bin/sh "/usr/local/netbeans-7.3/bin/netbeans"运行字段显示/bin/sh "/usr/local/netbeans-7.3/bin/netbeans"

  5. OK, so now login as root, add user foobar and set password:好的,现在以 root 身份登录,添加用户 foobar 并设置密码:

     el@defiant $ su Password: [root@defiant bin]# useradd foobar [root@defiant bin]# passwd foobar Changing password for user foobar. New password: passwd: all authentication tokens updated successfully.
  6. exit super user and login as foobar on terminal:退出超级用户并在终端上以 foobar 身份登录:

     [root@defiant bin]# exit exit el@defiant $ su foobar Password:
  7. Then run netbeans as foobar:然后将 netbeans 作为 foobar 运行:

     [foobar@defiant bin]$ /bin/sh "/usr/local/netbeans-7.3/bin/netbeans"
  8. Netbeans comes up, fresh and new. Netbeans 来了,新鲜的。 Now everything works normally.现在一切正常。

I would try changing the directory you are saving the project in - if this doesn't work, try reinstalling Netbeans.我会尝试更改您保存项目的目录 - 如果这不起作用,请尝试重新安装 Netbeans。

Or try clicking on finish.或者尝试点击完成。 When it blinks, close the new project window and then check if the project has been created.当它闪烁时,关闭新项目 window,然后检查项目是否已创建。 Sometimes programs have this bug where it creates the project, but doesn't close the Create New Project Window/ inform the user.有时程序在创建项目时会出现此错误,但不会关闭“创建新项目”窗口/通知用户。

I am speaking from experience- this happened to me a couple of weeks ago, and reinstalling Netbeans worked for me.我是根据经验说话的——几周前发生在我身上,重新安装 Netbeans 对我有用。

PS: Any IDE errors are logged in %userprofile%.netbeans\7.0\var\log\messages.log Check it out if you come to a dead end. PS:任何 IDE 错误都记录在 %userprofile%.netbeans\7.0\var\log\messages.log 中,如果你走到了死胡同,请检查它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM