Your original question seems to imply that C++ is currently less popular
than Java. I don't know if this is the case or not but Java seems to be the
language of choice for most application programming.
It depends on the domain. I've mostly worked on large scale
servers, and I've never seen Java there. Here (purely
application), we use Java, C# and C++, but its well over 90% C++
(mainly numerical number crunching). In the telephone systems
(network management) I've worked on, Java has been limited to
front ends, and in many cases, those have been replaced by
outputting HTML, and using Firefox as your front end.
I doubt the Oracle argument will have much affect on the popularity of
either as it's probably no more than corporate bickering.
I totally agree. Those who would have been turned off by one
company managing everything dropped Java a long time ago;
despite the claims, Sun was never very open with it.
C++ is not a portable programming language and any, non trivial, program
will only work on the system is was designed to work on.
That's not been my experience. I've moved several large (500
KLoc or more) applications from Windows or Solaris to Linux,
with no real problems. Given the way the language has evolved,
it's often been more work to move to a more recent version of
the compiler than to move from Windows to Unix.
Of course, there are parts that aren't standard, like the GUI.
My applications typically don't have a GUI, but I've heard of
people using Qt or WxWindows and porting without problems.
Parts of code can
be modularised and considered protable but this doen't change the fact you
still need vastly different programs and different sets of debugging and
testing trials etc etc.
You definitely need a distinct binary, and regardless of the
language, you definitely want to test on all of the platforms
your software will run on. (One could argue that this is a plus
for C++. The fact that your application can't run on a machine
you haven't built it for means that you can be sure of being
able to test it on all platforms it will run on. Java's binary
portability can cut both ways.
Because of this think C++ will become more
specialised towards low-mid level OS routines and high performance graphics.
Front end applications will be left to other languages such as Java and
dotnet langs to name a few.
Because of the lack of a standard library, C++ does have
a disadvantage when it comes to GUI's; I'd probably recommend
Java for a GUI front end, rather that C++, if for some reason
just outputting HTML to a browser wasn't sufficient. But the
GUI front end is just a very small part of most applications.