If I got it right, you want to have a Java GUI to control your C application, right?
But I didn't understood if you start the two processes separately (start the Java process witch waits in server mode and then start the C process with connects to the Java process as a client) or the one starts the other (C process starts the Java process and then connects to it as a client).
If the second case best describes what you're trying to do, then you should consider using JNI. As you're familiar with C, you should not have a problem to follow the instructions described in
this book (chapter 7 - "The Invocation Interface" shows how to start the JVM) and get rid of sockets and synchronization issues completely.
I've done exactly the same thing to pass events triggered by a Java process to a native application. If you decide to follow this path I can help you by posting here parts of the code I've already written.