code: public synchronized static boolean hasSudo()
  	{
  		if (!sudoTested)
  		{
  			String[] cmdArr = new String[]{"which", "sudo"};
  			List<String> cmd = new ArrayList<String>(cmdArr.length);
  			Collections.addAll(cmd, cmdArr);
  
  			ProcessBuilder whichsudo = new ProcessBuilder(cmd);
  
  			try
  			{
  				Process p = whichsudo.start();
  				try
  				{
  					Execed e = new Execed(cmd, p, false);
  
  					// Let it run
  					int returnCode = e.waitForExit(new Deadline(3, TimeUnit.SECONDS));
  
  					sudoSupported = (returnCode == 0);
  					sudoTested = true;
  				}
  				finally
  				{
  					p.destroy();
  				}
  			}
  			catch (Throwable t)
  			{
  				sudoSupported = false;
  				sudoTested = true;
  			}
  		}
  
  		return sudoSupported;
  	}
docs: Determines whether sudo is supported on the local machine
  
  @return