That wasn't just corporate marketing; Java was the first memory safe language to be widely used in enterprise code, and it led to a lot of C/C++ code being rewritten to address the issue of memory safety bugs. The same may happen with Rust, or perhaps C++ will add facilities for a memory safe subset of the language.
I want to divorce the marketing from the implementation for a second here; Java was widely used in the enterprise as a C++ replacement because of the marketing blitz, not really because of its technical prowess (with the benefit of hindsight, it's safe to say that Java's marketing vastly overpromised what Java could actually deliver for the first decade or so of the language's life). Note that PHP was the beneficiary of a similar (though smaller) enterprise marketing blitz, and PHP took far longer to get its act together than Java did; these companies were adopting based on what they read in magazines and saw on TV (yes, there were TV commercials for Java!).