【问题标题】:Exception in thread "main" java.lang.IllegalArgumentException: PWC6309: Illegal compilerSourceVM: 12线程“main”java.lang.IllegalArgumentException 中的异常:PWC6309:Illegal compilerSourceVM:12
【发布时间】:2019-09-14 13:59:18
【问题描述】:

我尝试运行以下代码:

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>Hello World!</h1>
    </body>
</html>

但 IDE 显示错误:

Exception in thread "main" java.lang.IllegalArgumentException: PWC6309: Illegal compilerSourceVM: 12
    at org.apache.jasper.JspC.setCompilerSourceVM(JspC.java:724)
    at org.netbeans.modules.web.project.ant.JspC.main(JspC.java:80)
    at org.netbeans.modules.web.project.ant.JspCSingle.main(JspCSingle.java:119)
F:\Code\Netbean project\Smartphone Shop\nbproject\build-impl.xml:936: Java returned: 1
BUILD FAILED (total time: 0 seconds)

如何解决这个错误?我将 Netbeans 11.0 与 Tomcat 9.0 一起使用。

【问题讨论】:

    标签: java jsp tomcat netbeans


    【解决方案1】:

    打开:

    [YOUR PROJECT DIR]/nbproject/build-impl.xml
    

    并删除或注释掉这两行:

    <arg value="-compilerSourceVM ${javac.source}"/>
    <arg value="-compilerTargetVM ${javac.target}"/>
    

    就是这样。为我工作:)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-11-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-02-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多