private void checkEnv ( ) throws MojoExecutionException { // check OS String osName = System . getProperty ( "os.name" ) ; if ( ! osName . startsWith ( "Windows" ) ) { getLog ( ) . warn ( "Wrong OS: " + osName ) ; throw new MojoExecutionException ( "Com4j can only be run on a Windows operating system, and you're running: " + osName ) ; } // check output dir exists if ( ! outputDirectory . exists ( ) && ! outputDirectory . mkdirs ( ) ) { getLog ( ) . warn ( "outputDirectory couldn't be created" ) ; throw new MojoExecutionException ( "The output directory " + outputDirectory + " doesn't exist and couldn't be created." ) ; } }
Check the runtime environment .