void validate ( ) throws IOException { validate ( platform , "platform" ) ; validate ( jdk , "JDK" ) ; validate ( executable , "executable name" ) ; validate ( mainClass , "main class" ) ; validate ( outDir , "output folder" ) ; if ( outDir . exists ( ) ) { if ( new File ( "." ) . equals ( outDir ) ) { throw new IOException ( "Output directory equals working directory, aborting" ) ; } if ( new File ( "/" ) . equals ( outDir ) ) { throw new IOException ( "Output directory points to root folder." ) ; } } if ( classpath . isEmpty ( ) ) { throw new IOException ( "Empty class path. Please check your commandline or configuration." ) ; } }
Sanity checks for configuration settings . Because users like to break stuff .