Java is a hugely successful application development platform and the reasons for this are many. The very safety that the language provides is core to why developers find it so appealing. Not having to worry about incorrect pointer manipulation, forgetting to free memory and memory leaks (although you can still have these in Java) make reliable, fast code much easier to write. However, having the secret sauce has also been vitally important to the success of Java as it has allowed powerful, high performing libraries and frameworks to be developed, providing developers with a wealth of functionality to build on.
So true. The whole Java Environment, with Maven and Gradle, is really a large chunk of its success.