System.err.println("Unable to start blackberry simulator: simulator not found: " + executable.getAbsolutePath()  ); return false;
String alternativeName = env.getVariable("polish.Emulator.Skin"); if (alternativeName != null) { executable = new File( this.blackberryHome, "simulator" + File.separatorChar + alternativeName + ".bat" ); } if ( !executable.exists() ) { System.err.println("Unable to start blackberry simulator: simulator not found: " + executable.getAbsolutePath()  ); return false; }
	public boolean init( Device dev, EmulatorSetting setting,			Environment env, Project project, BooleanEvaluator evaluator,			String wtkHome ) 	{		String blackberryHomeStr = env.getVariable("blackberry.home");		if (blackberryHomeStr == null) {			System.err.println("Unable to start blackberry simulator: Ant property \"blackberry.home\" is not set." );			return false;		}		this.blackberryHome = new File( blackberryHomeStr );		if ( !this.blackberryHome.exists() ) {			System.err.println("Unable to start blackberry simulator: Ant property \"blackberry.home\" points to an invalid directory: " + this.blackberryHome.getAbsolutePath()  );			return false;		}		File executable = new File( this.blackberryHome, "simulator" + File.separatorChar + dev.getName() + ".bat" );		if ( !executable.exists() ) {			System.err.println("Unable to start blackberry simulator: simulator not found: " + executable.getAbsolutePath()  );			return false;		}		ArrayList argumentsList = new ArrayList();		if (File.separatorChar == '/') { // this is a unix environment, try wine:			argumentsList.add("wine");			argumentsList.add( executable.getAbsolutePath() );			argumentsList.add("--");		} else {			argumentsList.add( executable.getAbsolutePath() );		}		this.arguments = (String[]) argumentsList.toArray( new String[ argumentsList.size() ] );				// now copy the jar, cod, alx and jad files to the simulator's home directory:		File targetDir = executable.getParentFile();		File file = new File( env.getVariable("polish.jadPath") );		try {			//FileUtil.copy( file, targetDir );			//file = new File( env.getVariable("polish.jarPath") );			//FileUtil.copy( file, targetDir );			String baseName = file.getAbsolutePath();			baseName = baseName.substring( 0, baseName.length() - ".jar".length() );			file = new File( baseName + ".cod" );			FileUtil.copy( file, targetDir );			file = new File( baseName + ".alx" );			FileUtil.copy( file, targetDir );		} catch ( IOException e ) {			e.printStackTrace();			System.err.println("Unable to copy BlackBerry resources to the simulator directory: " + e.toString() );			return false;		}		return true;	}