It depends
As you can tell by the replies, it depends so much on what you want to do. I've made a living as a Java developer for the past decade plus, and the market for Java developers is still very healthy. Will that market contract eventually? Certainly, but it's not yet apparent what will replace it. While C#/.Net could be viewed as a "competitor" to Java, I don't think you'll see companies moving from Java to .Net, because that would also require a migration to Microsoft, from the commonly deployed Unix or Linux servers. In other words, Microsoft shops will continue to use .Net, and Linux/Unix shops will continue to use Java, for the foreseeable future. Either or both will eventually be superseded, but one won't replace the other en masse.
The Mac makes a great development environment for server side Java applications; the so called "enterprise" development. Perhaps less so in the desktop arena, but frankly I'm unimpressed with Java on the desktop, as is the industry at large. Obviously, if you're looking to go the .Net route, you're going to need to run Windows.
So, enterprise development pays well, and offers a lot of employment opportunities, and it's how I've made a good living for the past decade. But I'll let you in on a little secret: It's not always the most satisfying work. So, I'm teaching myself Cocoa and Objective-C programming, as well as Python and Ruby. The former pair is, of course, to open the door to Mac and iPhone development, while the latter is if I want to do other web development, for which Java is overkill. And, both Ruby and Python can be used for Cocoa development, though Python appears to be more popular than Ruby in this area.
But mainly, it's fun and useful to learn new languages and frameworks. Learning Cocoa can make me a better Java developer at my day job. Likewise, I use Python to write one-off scripts for work. The only problem is, the day job consumes so much of my time, that time for tinkering with other languages is limited, so it'll be some time before I'm half as proficient in these other languages as I am in Java.