每次我尝试构建我的c ++文件时都会收到此错误
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/c/Users/Joey/Documents/NetBeansProjects/C++Train'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/c__train.exe
make[2]: Entering directory `/c/Users/Joey/Documents/NetBeansProjects/C++Train'
make[2]: mkdir: Command not found
mkdir -p build/Debug/MinGW-Windows
make[2]: Leaving directory `/c/Users/Joey/Documents/NetBeansProjects/C++Train'
make[1]: Leaving directory `/c/Users/Joey/Documents/NetBeansProjects/C++Train'
make[2]: *** [build/Debug/MinGW-Windows/HelloWorld.o] Error 127
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 2s)
Run Code Online (Sandbox Code Playgroud)
我检查了make.exe所在的目录,mkdir就在那里,所以我只是感到困惑.
我的代码本身没有显示错误:
#include <iostream>
int main() {
using namespace std;
cout << "Hello World!" << endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
只是一个简单的小世界来测试netbeans.
作为java swing GUI界面和我在学校即将推出的Geometry课程的介绍,我决定为该课程制作一个"特殊"计算器.现在我有一个空指针,我不太明白是什么导致它.我编程的方式适用于我的其他课程,为什么它不能在这里工作?
无论如何这里是错误所在的两个类,另外两个有效,我不明白我做了什么不同.这是错误:
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at geohelper.GeoFrame.addToGUI(GeoFrame.java:90)
at geohelper.GeoFrame.showGUI(GeoFrame.java:42)
at geohelper.GeoHelper$1.run(GeoHelper.java:13)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:697)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: java.lang.NullPointerException
at geohelper.RPrismListener.<init>(RPrismListener.java:21)
at geohelper.RecPrism.<clinit>(RecPrism.java:14)
... 17 more
Run Code Online (Sandbox Code Playgroud)
这是形状的类(矩形棱镜)
package geohelper;
import java.awt.Container;
import java.awt.event.ActionListener;
import javax.swing.*;
import javax.swing.event.DocumentListener;
public class RecPrism {
static final JButton rprismbutton = new JButton("Calculate");
static final JTextField rplength …Run Code Online (Sandbox Code Playgroud)