首页 > 解决方案 > 在netbeans ide中运行java代码的问题

问题描述

我正在使用 netbeans ide 10.0 我什至无法运行单个代码。请帮忙

我试图改变java版本

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package helloworld;

/**
 *
 * @author admin1
 */
public class HelloWorld {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
    }
}

我得到这个输出

线程“主”java.lang.RuntimeException 中的异常:无法编译的源代码 - Null ctor sym 类型:RuntimeException(java.lang.String)
    在 helloworld.HelloWorld.main(HelloWorld.java:1)
/home/admin1/.cache/netbeans/10.0/executor-snippets/run.xml:111:执行此行时出现以下错误:
/home/admin1/.cache/netbeans/10.0/executor-snippets/run.xml:94:Java 返回:1
构建失败(总时间:0 秒)

标签: javanetbeansnetbeans-10

解决方案


推荐阅读