When Java was first released in its current incarnation, when it became known as Java, its tagline was, “Write once, run anywhere”. What they didn’t tell you were you hoops you had to jump through to distribute the software, especially if the people using it weren’t developers themselves, and the RAM usage, especially compared to other programming languages.
At the time there wasn’t much that could be done about the situation. Java was still a closed-source programming language owned by Sun Microsystems, and they dictated that if you were going to distribute the Java virtual machine with your program in order to make things easier on the user you had to distribute almost the whole thing, not just the parts you needed, meaning the package would be over a hundred megabytes even for a small program. During those days many people still had dial-up Internet so that would be a lot for them to download.
These days Java, under the helm of Oracle, has been open-sourced and is available from a number of different vendors, as well as being included in just about every major Linux distribution. The various Java teams are working on making Java more portable, although they do have their work cut out for them because of the way Java has been integrated into a big blob thus far.
Other software projects are emerging such as GraalVM which not only release a specialized version of the Java virtual machine but also give you the ability to compile Java code into native programs just like any other programming language, which means you don’t need the virtual machine to use them, the file size is a lot smaller, the RAM usage is a lot smaller, and they start-up and generally run better.
Java is certainly making some progress. There have also been attempts to export Java programs into both WebAssembly and JavaScript. These projects need a lot more polish but at least work is being done in those directions.
If Java can continue to embrace more platforms and uses, especially games, if it can simplify the process of distributing and running the applications, and if it increases its ability to run on web pages, Java could adopt a new motto of being the anything language.