Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Nuke ES_CLASSPATH appending, JarHell fail on empty classpath elements #13880
Old ES 1.x startup scripts were buggy, adding empty classpath elements. But this can be horrible: it means "CWD" to java, and when starting from a service maybe that is /, and now JarHell is scanning your entire computer (like #13864).
It would be better to just fail hard on a bogus classpath, and hint at the possible cause
Additionally, users can still override ES_CLASSPATH, which caused the whole bug in the first place for the 1.x scripts, but we should fail on that too. Its not going to work and you will just get a securityexception. Instead we can tell the user how to do it better.
Maybe we want to clean this up for earlier versions (e.g. 2.1 or maybe even 2.0) too, as some of it is "our fault" (the old broken scripts) and possible still "our fault" (maybe packaging is not upgrading them properly?)