If you're looking at compiling Java into machinecode on Linux, it can be done with GCJ. It supports many exciting things, like networking, but not the GUI yet. But they're working on it.

But of course, C++ is just as good, and perhaps better for Linux. I like Java because of the portability and simplicity, but for some work you might be better off using something else.