gpt4 book ai didi

c++ - 在 Netbeans 7.2 中运行 C++ 程序时出现 java.lang.NullPointerException

转载 作者:IT老高 更新时间:2023-10-28 22:33:30 26 4
gpt4 key购买 nike

我想尝试使用 C++ 并想使用相同的 netbeans IDE,因为我已经将它用于 Java 开发有一段时间了。我下载了 Cygwin 工具并相应地设置了 IDE。当我尝试运行应用程序时,它说构建成功...,

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/cygdrive/c/Users/LJee/netbeans/tut-install/CppApplication_1'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/cppapplication_1.exe
make[2]: Entering directory `/cygdrive/c/Users/LJee/netbeans/tut-install/CppApplication_1'
make[2]: `dist/Debug/Cygwin-Windows/cppapplication_1.exe' is up to date.
make[2]: Leaving directory `/cygdrive/c/Users/LJee/netbeans/tut-install/CppApplication_1'
make[1]: Leaving directory `/cygdrive/c/Users/LJee/netbeans/tut-install/CppApplication_1'


BUILD SUCCESSFUL (total time: 450ms)

但程序不会运行。它会引发 Java Null 指针异常。

java.lang.NullPointerException


RUN FAILED (exit value -1, total time: 26ms)

由于 C++ 程序中没有 Java 代码,这一定是 IDE 的问题。我在 Netbeans 论坛上看到了这个帖子 http://forums.netbeans.org/topic52231.html

这里用户更改了我不想做的IDE版本。

有没有遇到过这种情况的人可以帮助我。我会很高兴的!提前致谢!!

最佳答案

我在 Linux Mint 18 Cinnamon 和 Netbeans 8.1 下遇到了同样的问题,我通过右键单击项目名称项 -> 属性 -> 运行 -> 控制台类型 -> “标准输出”解决了它

之后“运行”命令完美运行。

关于c++ - 在 Netbeans 7.2 中运行 C++ 程序时出现 java.lang.NullPointerException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15737390/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com