There's some major differences between Java and C. Java is isolated from the operating system via the java virtual machine (JVM). The JVM abstracts the operating system away from the program. A java application might ask the JVM for a chunk of memory, and the JVM then asks the OS for that memory. There are many JVMs for different platforms / operating systems. The JVM is what allows the same java program to run on different platforms.
With C, there is no OS isolation. C programs (usually) run directly on top of the OS, making direct OS calls. This makes ties that C program to a specific operating system / platform. Any non-trivial program is going to make calls into the operating system. In addition, C programs are compiled down into bytemachine code, which is hardware specific. A compiled C program for x86 cannot be directly run on an ARM processor.