import java.io.*; File jfxFolder = new File( basedir, "target/jfx" ); if( !jfxFolder.exists() ){ throw new Exception( "there should be a jfx-folder!"); } File jfxAppFolder = new File( jfxFolder, "app" ); if( !jfxAppFolder.exists() ){ throw new Exception( "there should be a jfx-app-folder!"); } File jfxAppLibFolder = new File( jfxAppFolder, "lib" ); File packagerJar = new File( jfxAppLibFolder, "packager.jar" ); if( jfxAppLibFolder.exists() || packagerJar.exists() ){ throw new Exception( "there should be a NO lib-folder within jfx-app-folder, and there should NOT be packager.jar, because we added opt-out parameter!"); }