有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java在TomcatJSP页面中使用JDK15的JEP378文本块

示例代码:

String s = """
test
""";
%>

得到

org.apache.jasper.compiler.JDTCompiler.generateClass Unsupported target VM [15] requested, using [13]

/usr/local/tomcat/bin/version。sh报告:

Server version: Apache Tomcat/9.0.38
JVM Version:    15+36-1562

http://tomcat.apache.org/tomcat-10.0-doc/changelog.html我看到:

Add support for specifying Java 14 (with the value 14) and Java 15 (with the value 15) as the compiler source and/or compiler target for JSP compilation. If used with an ECJ version that does not support these values, a warning will be logged and the latest supported version will used. (markt)

有人在非alpha Tomcat上成功获得文本块吗


共 (0) 个答案