I am doing a project in java which has the function to add files in database, and i want to use winapi functions to select files. How would i do that?
By far the easiest way is by using Java JNA, it already has translation from stcalls in.
You can find a basic tutorial for it (with Winapi example no less) on JavaWorld.
You could also use JNI, but JNI requires you to use specially built header files for interfacing and it's all in all harder to maintain and use. It's slightly faster in some cases though.