I see Java as a good C++ replacement. I refuse to write anything in Java that I wouldn't want to write in C++ (for example I've refused to do web programming in Java).
I see Java as a good C++ replacement. I refuse to write anything in Java that I wouldn't want to write in C++ (for example I've refused to do web programming in Java).
Your approach to it seems reasonable, although I find myself writing extension modules (for R, PHP, Python, Perl even) in regular old C... not because I particularly dislike C++ or Java, but because if I can get away with just C, it's less likely that I'll step in a template-error or uncaught-exception shitstorm with a 10-page backtrace.
I should have stated this in my comment, but I don't like C++ much (which is why I'd rather use Java over C++). But I absolutely love regular old C. It's a beautiful, simple programming language. I think C is a perfect language for implementing programming languages, libraries and operating system.
The real danger of the java language is that it's hostile to lean/agile development. If you're in a market that iterates quickly, that can be a real problem. If you work for a bank... less so.
Just to make it clear, I will never use Java (or PHP for that matter) to develop web applications.