Java is used often for enterprise application and use-cases, where correctness is more important than speed to market. Java is highly sought after in markets where enterprise consulting for development is a big. Java is often see as “the enterprise language of choice” due to it be “enterprise safe” since its type-safe, has been around a while (people have 20+ years of experience using it) and has proven time again it can do the job.
The simple fact is dynamically typed languages are faster/easier to write, but easier to introduce bugs. Java is tried and true, and for most companies that’s what they want. Javascript is web oriented, and not that great in many use-cases (since its single threaded), whereas Java is very flexibile in its potential use-cases, since it can run anywhere that can run the JVM.
Java enterprise applications sometimes get a bad wrap due to “highly paid consultants” writing terrible code, even tho “java is enterprise”. Bad code is bad code, bug that isn’t the languages fault. Regardless of the programmer, Java has stood the test of time, and for most companies that’s good enough.
So learn Java if you want to use Java. Don’t learn Java if you don’t want to use Java.
Finally, job markets are all relative. Knowing whats in demand where you want to work is important because there are differences. If getting employed is more important than using the framework/language you want, then you should adapt to the most popular where you want to work, just to make your job search easier.
Programming is programming, if you can program complex applications using Javascript, the jump to Java or any other language shouldn’t be that hard. Learning the syntax, and design decisions between the languages is important to, so you can decide which language would be better for a given problem.
Heres some examples:
A business application that needs to be as correct as possible, such as bank software, should be built with security and “correctness” in mind, shouldn’t choose a dynamic language like Javascript or Python.
An application where “speed” is the most important, such as graphic drivers, or game engines should pick a language like C or C++ due to these languages speed.
An internal IT application that needs to be built cheaply (probably via offshore development) will probably pick a stack with the cheapest bidder.
An internal IT team needs to build a simple CRUD app with user-friendless in-mind, then Nodejs+Javascript might make a good choice, since the web is accessible, and full stack is easiest (since its full stack JS)
Not everything makes sense as an express/node app, but a lot of use-cases do, so its a good choice, but again if your goal is to get a job, examine the job market to know whats best for you
Good luck 