This is very similar to this question, and the answers may help you: Compiler for translating Java to C.
Summary. . There are tools for this (Toba, GCJ, etc.), but you may not encounter problems with all portable Java libraries. In the end, the tools are likely to do only the PART OF WORK, and you will have to manually compose some of the rest.
A good first step is to convert your Java code only to use the standard libraries available in Java 1.4. In fact, you probably want to wean as much as possible from everything that is not in java.lang packages. * Or java.util. * To simplify the porting procedure.
Depending on the size of your code base, it may actually be easier to rewrite the volume directly, rather than relying on tools. Java and C have a lot of syntax similarities, but the mismatch between C straight procedural code and object-oriented Java objects can cause problems. Automated tools can generate almost invisible C code when trying to get around this, and there is always the opportunity for subtle errors.
Update 2016: Do not do this, not now, and not ever. The parameters that were used for this were not supported (for example, GCJ), and it may be easier to find a developer who owns Java than C. In addition, Java performance continues to improve, and basic implementations tend to have the same performance. Optimized C is even faster, but the edge is getting smaller and smaller with each version of the JRE.
source share