Sure, it is not a problem as long as you are aware of it.
> but is anyone using Java for new projects these days?
I work with large financial companies, think banks, brokerage houses, payments, etc.
Pretty much every large company in finances runs on Java and most new projects are in Java.
Java is uniquely suitable for this. I spent a lot of time thinking why is this. I think it is a combination of Java being relatively poor, handicapped language suitable for mediocre programmers not able to do much more than copy/paste. I love Common Lisp or Clojure but I quickly found using any powerful language with a software development team at a large bank must lead to a disaster. With Java, that disaster if it happens is limited a bit because there is less abstractions you can shoot your foot with.
Huge amount of boilerplate code means all projects look pretty much the same and every developer finds himself/herself right at home in a new project. If you know one Spring REST API you know pretty much all of them. Which is hugely important if your developers are barely able to learn new things.
Aside of the above, Java gained popularity due to its virtual machine, garbage collection, object orientation and pretty good standard library and ease of adding more dependencies to the project. Right now it is self sustaining situation because the amount of dependencies that are available, amount of software written and the fact that all those financial institutions have to maintain Java teams means, that it is almost always cheaper to hire more Java devs than try to use other languages.
Some companies have a lot of tooling made for and internal frameworks built in Java. It would be a lot of effort to rewrite all of that in another language, and also a lot of effort to just forego all these goodies and implement them myself. In the end I'm getting paid to ship a product.
Sure, Java is not "cool", and new devs fresh out of university might prefer something else, but let's not forget that modern Java is nothing like the Java that a lot of people used a while back. Most of the criticism we heard ("boilerplate") is not really valid anymore.
If you don't know anything about a large company and have a meeting with someone in IT there, it's a safe bet that boning up on Spring Boot before the meeting will be beneficial.
Also, if a new system has to connect to a legacy system using SOAP there are about 2 languages with a complete and interoperable implementation: Java and .NET. There are lots of toy libraries for other languages but I've never found one fully supporting the entire WS-* standard set.
It's not trendy, but that alone is not enough to overcome the advantages of choosing the fleet standard in a company that already has a substantial investment in Java.
There are of course smaller Java frameworks that you can use if you have made an honest try and dont like Spring, but the eco system is hard to beat. Go also does not have any benefits that are of any real value to me. I have admittedly not tried Elixir, but it seems to me that the mature eco system around Java is better for someone like me who is not interested in spending time on less mature 3rd party dependencies. I like the concept behind Phoenix Liveview, so I will try it sometime.
Java as a language has improved a lot recently, and while there it could be better at handling nulls, it's not enough to make me choose Kotlin.
If you had told me I would have Java+Spring Boot as my first choice 10 years ago, I would have doubted you. Java at the time seemed to stagnate, but this has changed .
C# is a close second. It depends on what the customer knows.
TypeScript third. But first for frontend.
Kotlin could have been on the list. It is a nice language but not worth the hassle (tied to one ide, extra configuration, examples that doesn't work etc).
I want to learn Clojure, and I'd be interested to try modern PHP again.
Every other language I will only recommend if people already use them and know them.
I have used Javascript, Python, Perl and VB (and used to prefer them over Java) but as I get older anf Java gets better I wouldn't waste my time on any of them except Perl, and only because I haven't used it in the last 15 years.