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. That said, Nick Smith was a bit surprised to learn that he was tasked with porting a Java application that ran on a UNIX host onto a Windows server. 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] }
[Advertisement]
BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!