我試圖在下面的代碼中運(yùn)行它:<%@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 向我顯示了一個(gè)錯(cuò)誤: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)如何修復(fù)此錯(cuò)誤?我將 Netbeans 11.0 與 Tomcat 9.0 一起使用。
1 回答

PIPIONE
TA貢獻(xiàn)1829條經(jīng)驗(yàn) 獲得超9個(gè)贊
打開:
[YOUR PROJECT DIR]/nbproject/build-impl.xml
并刪除或注釋掉這兩行:
<arg value="-compilerSourceVM ${javac.source}"/> <arg value="-compilerTargetVM ${javac.target}"/>
而已。為我工作:)
添加回答
舉報(bào)
0/150
提交
取消