Get a distance to this thread and posts. Some of it as such BS so it is painful to read.
Java is a great technology, espacialy for writing web -applications-, and don't eve try to compary it to Ruby or PHP !
Ruby and PHP are scripting. interpreted language for very small websites, not -applications-, especially enteprise solutions. The difference is incredibly huge, with possibilitied and with size of learning trail.
Want to be a pro developer ? go into C# or Java, want to make small websites, scripts etc. you can go for PHP/Ruby/Python.
Almost all people dosen't even understand difference between website and web application. Forgot about backgourn services with PHP, ultra scalability etc.
Also, forgot about efficiency and learning C++ as main language if you don't want write code for devices not PC's. The truth is, that any efficiency will be need in 1% or less of your code,
and there is no reason to create other 99% code with painful C++, espacialy if you can always skip to lower level by using DLL.
Java isn't "great for mobile" , "super compatible with many OS", if you write GUI application for win/linux, you will not run in on a phone etc. te 90% market of java is I think, enterprise web soluition, with huge systems divided into lot of modules, running on clusters of server - this is a place where Java fits perfect.
But, you can also easily create Android applications or Windows/Linux GUI apps, even with drag-drop GUI creators, like with .NET.
I worked lot of years in PHP, and severals years with Java, and I can compare it's learning trails like "Java is at least 20 times bigger than PHP, with possibilities, efficiency and amount to things to learn", so this is quite big factor. Want to be a pro Java programer - be prepared to read tens of thausands pages of books/tutors/documenations and write hundreds of thausands lines of code before you be a good programer ! you can achieve this in PHP about 10x times faster in my opinin, but there is a reason to going Java way - think about it.
Don't think at sentences like "Faceboko is written in PHP" or "Java is slow".... If you will go deep into it, you will understand why, after several months or years with Java and general programing that would be stupid sentences for you.