我试图在下面的代码中运行它:<%@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: 1BUILD FAILED (total time: 0 seconds)如何修复此错误?我将 Netbeans 11.0 与 Tomcat 9.0 一起使用。
1 回答
PIPIONE
TA贡献1829条经验 获得超9个赞
打开:
[YOUR PROJECT DIR]/nbproject/build-impl.xml
并删除或注释掉这两行:
<arg value="-compilerSourceVM ${javac.source}"/> <arg value="-compilerTargetVM ${javac.target}"/>
而已。为我工作:)
添加回答
举报
0/150
提交
取消