I am working on JNI to integrate C++ and java either way. I would like to know to build a dll from my c code
I presume you are using some variant of Microsoft OS (NT/Win2K). If so, then the development tools would (and should) be Visual C++ (or equivalent product from Borland). Once you have the development tools in place, creating DLLs is quite easy. You will have to address the threading model carefully depending on the requirements of the JNI clients.
You may find more helpful advice if you post your question to Win32-specific discussion groups!