[英]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'm using Java version 1.7.0_25
我正在使用 Java 版本
1.7.0_25
How to reproduce如何重现
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:脚步:
.netbeans
ide configuration folder..netbeans
ide 配置文件夹。/home/el/NetbeansProjects
directory where netbeans stores your programs./home/el/NetbeansProjects
目录。/home/el/.netbeans
directory which has configuration info for the IDE./home/el/.netbeans
目录。 Opening netbeans as a new user will create a new .netbeans
folder.以新用户身份打开 netbeans 将创建一个新的
.netbeans
文件夹。 And works for same reason as above.并且出于与上述相同的原因而工作。
Walkthrough:演练:
The run field says /bin/sh "/usr/local/netbeans-7.3/bin/netbeans"
运行字段显示
/bin/sh "/usr/local/netbeans-7.3/bin/netbeans"
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.
exit super user and login as foobar on terminal:退出超级用户并在终端上以 foobar 身份登录:
[root@defiant bin]# exit exit el@defiant $ su foobar Password:
Then run netbeans as foobar:然后将 netbeans 作为 foobar 运行:
[foobar@defiant bin]$ /bin/sh "/usr/local/netbeans-7.3/bin/netbeans"
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.