In our project, we are using Resin as the production server. On my local machine, I was using Jetty but I've faced some differences in the application's behavior on different servers. That's why I am trying to add configuration to Intellij IDEA which will use Resin as an application server.
When I am trying to run it, I get the following error:
[20-09-03 16:35:39.134] {resin-port-80-49} warning: [options] bootstrap class path not set in conjunction with -source 1.5
warning: [options] source value 1.5 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
/include/header.jsp:70: error: diamond operator is not supported in -source 1.5
List<String> jsEncodedItems = new ArrayList<>(list.size());
^
(use -source 7 or higher to enable diamond operator)
1 error
3 warnings
I've checked the Java version in "Project structure" and in maven's pom.xml but everywhere I've found 1.8. Meanwhile, using Jetty I don't get an error like this, and everything works as expected.
Maybe you have any idea how to fix this?
You can find my configuration on this screenshot:
This is beacause resin uses javac to auto compile your JSP files, and without "-source " argument, it will use 1.5 as source version as default.
To fix this in resin, edit resin.xml, add one of the below inside <resin>
:
<javac compiler="internal" args="-source 1.8"/>
or
<javac compiler="javac" args="-source 1.8"/>
change the source version whatever you like.