public static void main(String[] args) {

		 currentPathExtensions = Installation.class.getProtectionDomain()
				.getCodeSource().getLocation().getPath()
				.replaceAll(Installation.filenameJar, "");

		Control.writeFile(currentPathExtensions + "BEval.sh",
				Installation.bEvalSh.replaceFirst("!currentPathExtensions!BEval.jar", currentPathExtensions+"BEval.jar"));
		
		Control.writeFile(currentPathExtensions + "BEvalProof.etool",
				Installation.bEvalProofEtool.replaceFirst("!currentPathExtensions!BEval.sh", currentPathExtensions+"BEval.sh"));
		
		Control.writeFile(currentPathExtensions + "BEvalGoal.etool",
				Installation.bEvalGoalEtool.replaceFirst("!currentPathExtensions!BEval.sh", currentPathExtensions+"BEval.sh"));
		
		
		
		pathProbCli = new JOptionPane().showInputDialog("Please, type the destination path of binary file probcli, for example: /Users/guest/Myprograms/ProB/probcli:");
		
		GeneralPreferences.updatePathProbcli(pathProbCli);
		
		//Downloading the b2llvm
		String filename = new String("b2llvm.zip");

		String destinationPath = System.getProperty("user.home")+File.separator+"Applications"+File.separator+"BTools"+File.separator;
		
		destinationPath = GeneralPreferences.getPathFileB2llvm(destinationPath);
		String destinationfilePath = destinationPath+filename;
		File f = new File(destinationPath);
        
        if(f.mkdir()) 
			System.out.println("- Destination directory: \""+destinationPath +"\".");
		
		int res = new JOptionPane().showConfirmDialog(null, "Would you like to download and update the b2llvm?","b2llvm" ,JOptionPane.OK_CANCEL_OPTION,	JOptionPane.WARNING_MESSAGE); 
				if (res == JOptionPane.OK_OPTION){ 
					System.out.println("Installing b2llvm:");
					//System.out.println("Checking if python is installed ..");
					
					String url = new String("https://bitbucket.org/ddeharbe/b2llvm/downloads/"+filename);
					
					URL website;
					try {
						System.out.println("- Downloading the b2llvm.");
						website = new URL(url);
						ReadableByteChannel rbc = Channels.newChannel(website.openStream());
						FileOutputStream fos = new FileOutputStream(destinationfilePath);
						fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
						System.out.println("- Download finished.");
					} catch (Exception e) {
						System.err.println("Cannot download the b2llvm from:"+url);
						e.printStackTrace();
					}
					
					//Write the files 
					System.out.println("- Unzip the b2llvm.");
					Unzip z = new Unzip();
					try {
						z.unzip(destinationfilePath,destinationfilePath.replace(filename, ""));
					} catch (IOException e) {
						System.err.println("Cannot extract the b2llvm file:"+destinationfilePath);
						e.printStackTrace();
					}
					System.out.println("- Unzip finished.");
					
			
					
					
				
		
		if(!System.getProperty("os.name").toLowerCase().contains("windows")) {
			    
			try {
				Runtime.getRuntime().exec("chmod +x "+destinationPath+"b2llvm.py");
			} catch (IOException e) {
				System.err.println("Error when trying to add the execution permission in b2llvm.py");
				e.printStackTrace();
			}
		}else{
			System.out.println("The installations procedures was not tested for Windows Operating System");
		}
		
		Control.writeFile(currentPathExtensions + "b2llvm.etool",
						Installation.B2llvm_tool.replaceFirst("!currentPathExtensions!BEval.sh", destinationPath+"b2llvm.py"));
		

		
		
				}
		//Control.writeFile(currentPathExtensions + "b2llvm.sh",
		//		Installation.b2llvmSh.replaceFirst("!currentPathExtensions!", destinationPath+"b2llvm.py"));

		//Control.writeFile(currentPathExtensions + "Config.txt",
		//		Installation.configTxt.replaceFirst("!pathProbCli!", pathProbCli));
		
		try {
			Runtime.getRuntime().exec("chmod +x "+currentPathExtensions + "BEval.sh");
			//Runtime.getRuntime().exec("chmod +x "+currentPathExtensions + "b2llvm.sh");
		} catch (IOException e) {
			System.err.println("Error when trying to add the execution permission in BEval.sh");
			e.printStackTrace();
		}
		
		System.out.println("The configuration files were updated!");
	}