Love it or hate it, one of the great things about Java is its portability. It abstracts out many of the platform-specific things so that you, the programmer, need not worry about things like file systems and how to create directories and the like.  Not a big deal, he thought, that's what Java was built for ...

public static MultipartRequest createMultipartRequest (HttpServletRequest req) 
  throws IOException
{
   [SNIP]

   // Create a temp directory for the attachments
   Runtime.getRuntime().exec ("mkdir -p " + Constants.UPLOAD_PATH);

   File check = new File (Constants.UPLOAD_PATH);

   [SNIP]

}