If you are writing Java on Windows, then it isn't portable, but every other version of Java I've used runs anywhere. There are complilers available that take Java source code and generate machine code, which isn't portable. C# normally generates CLI not machine code which runs on the .NET runtime engine (which isn't portable yet) and is very similar to the Java virtual engine.
If you want to write in C# you can, but please be accurate about what C# and Java are.
I'm afraid Java and C# will die from the same cause, bloat. The core languages while being small is lost to the very large number of library functions you have to learn to take advantage of the language.