I can't see why this should need Java.
Why are you merging the files into one, what are the expected benefits?
Do the different schema documents use the same target namespace or different target namespaces? If the same, then they can be logically combined using <xsd:include>, there's no need to combine them physically. If different, then the only way to combine them is with <xsd:import>.
But if you do want to combine the files physically, then you could use XSLT. Or a text editor.
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference