On 28/08/17 15:10, Christopher Schultz wrote:
> 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.

There may be other, less immediately obvious problems 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.
> 
> Any objections?

None here.

As background, I was holding off back-porting the Java 9 fixes until
Java 9 was released so we had a fixed rather than moving target for Java
9 compatibility. There is an argument that it isn't unreasonable to
expect users using cutting edge JVMs to also use the cutting edge Tomcat
release (in which case it would just work).

This particular feature seems to be fixed - hence my lack of objection.

I didn't keep track of the Java 9 fixes so at some point we'll need to
go through the svn commits to find them. I did try and include Java 9 in
the commit message so it should be a simple search.

Mark



> 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.
> 
> -chris
> 
> [1]https://stackoverflow.com/questions/45917401/tomcat-7-0-73-doesnt-wor
> k-with-java-9
> [2]
> https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-2C896CA8-927
> C-4381-A737-B1D81D964B7B
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to