-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Rainer,
On 8/28/17 12:45 PM, Rainer Jung wrote: > Hi Chris, > > Am 28.08.2017 um 16:10 schrieb Christopher Schultz: >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 >> >> All, >> >> According to this post[1] over at SO, Tomcat 7 doesn't work with >> Java 9 out of the box. This is because of the use of >> -Djava.endorsed.dirs, which also appears in Tomcat 8. I suspect >> that feature is used in prior versions of Tomcat startup scripts >> as well. >> >> Tomcat's "Which Version" page claims that Tomcat X works with >> Java "Y and later", which is not strictly true at this point >> because Tomcat's startup scripts will cause Java 9 to fail[2] due >> to the removal of the endorsed overrides mechanism. >> >> I'm wondering if we should modify the startup scripts to stop >> specifying -Djava.endorsed.dirs unless the environment variable >> actually contains a value. The current catalina.sh in Tomcat 8 >> supplies this option unconditionally, therefore Java 9 will >> fail. >> >> The only place I can see where JAVA_ENDORSED_DIRS is actually >> *set* in catalina.sh is when the user is running cygwin, but that >> is only to convert the path separator from \ to / for UNIX-style >> paths. > > I think it gets set to "$CATALINA_HOME"/endorsed in setclasspath.sh > if the user has not set JAVA_ENDORSED_DIRS herself. Ah, thanks for finding that. I wasn't thinking about setclasspath.sh. > I would slightly modify your plan for compatibility, namely setting > it only if the user has provided JAVA_ENDORSED_DIRS *or* > "$CATALINA_HOME"/endorsed exists. AFAIK we do not ship any Tomcat > packaging that contains such a directory. So if [ -z "${JAVA_ENDORSED_DIRS}" -a -d "${CATALINA_HOME}/endorsed" ] then we'll set JAVA_ENDORSED_DIRS. And if the value is empty when launching Java, we'll leave it out? > This would slightly improve compatibility with existing > installations if people would have created the default TC endorsed > dir and used it. +1 >> Any objections? >> >> Tomcat 8.5/9.0 have removed the JAVA_ENDORSED_DIRS environment >> variable from their scripts, so there should not be any >> problems, there, of course. > > In all version there is a mention of the endorsed system property > in java/org/apache/jasper/compiler/AntCompiler.java, but the code > looks like it only uses it if it was already set. That should be > OK. > > There's also a mention of it in > webapps/docs/class-loader-howto.xml, tool-wrapper.sh and daemon.sh > as well as the bat versions of the files and in res/tomcat.nsi (all > for TC 7 and 8). I'll have a look at these as well. - -chris -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJZpGhfAAoJEBzwKT+lPKRY1UcP+wcyvDeiTdOqbZ7GfQHTlk/a DhqMH9YgC4suRjyZUY5zzC/PS86alm6RvY+NS2qHZASRwpYauTtO6Y3lJfzU4gm/ ddXIi2YZt2QqgiMkh3Csyj6NsmublNnIgjWrNV3Ac+spSW7OBQehUQSVXmutN3UL 4XCzyBmfJOtXtUbwhVZZKj/qxpNDmmcfXJU09xHe0iBKBsD8Yo/nk6H3UhVWNbvt DPMPyb3TKqgb9ectVPiGTeBVcAhVokohvUg6D9f211H02rWXPSlqwaE4N8mUyp/z 0+8b1bdUboP6/7pIsZiS4vKCOY6A0CZ4uHFILMvDh0NCtGm47zTf0Me9htiRz4P5 vZ6S45Fuh9QeKOd32ZCSO7gFNF2socg4dLblMuuSF9Ul1aV2CBs4c3r5W0NZBYIB AELH0HHKamGK/EffDG7SxmQ7fVmZLOwkAX5527Kvo2cZay75nwfc/U/10mjxdyQR hnW6wA84V5VskRKghliSIEd2sznHcWEC4TvkOqntDPe+Q3WHBdSKhyxD/1oYFgDq 0aA6aSqN0jlk0wsUyc1p4H34KCswfXq33JAJ8O1U3tqOy3qqVsd5lQTsT9jiHe0H pYDr55M2jOerXhjWl/5Hp2vryTzuttQWlsirU8JHvVdnn50FIqhA/YQLA4oaUvaL wDG2akIMyLnerexipoMY =ANE8 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org