First I would let you know the solution and discuss about the problem
Solution : C:> scomp -d D:\JarXml -out Event.jar Event.xsd
where JarXml should be a empty directory.
Reason:
On investicating I found an interesting thing, if
you should use empty directory for -d, like -d d:\, scomp just take all the files in D: and try to make the jar.
In my case earlier I used to put -d D:\,
C:>scomp -d D:\ -out Event.jar Event.xsd
so it doesn�t know which two directory it creates and so it tries to generates JAR from all the directory in the D:, and end up in IO Exception.
Typically it create two directory namely com andJarXml.
Hope this helps.
One more information, I use NTFS file system, it seems people use other files system may not get this error.
The reason is for NTFS it tries to create C:\DOCUME~1\GOWRIS~1\LOCALS~1\Temp\xbean31056.d\classes\schemaorg_apache_xmlbeans\javaname\xxx\xx
ending up in org.apache.xmlbeans.SchemaTypeLoaderException.