private void startup() throws IOException {

		installCurrent();
		
		executor.submit(new Runnable() {

			@Override
			public void run() {
				while (!cancel) {
					for (WatchEvent<?> evt : key.pollEvents()) {
						@SuppressWarnings("unchecked")
						WatchEvent<Path> event = (WatchEvent<Path>) evt;
						Kind<Path> kind = event.kind();
						Path name = event.context();
						Path child = path.resolve(name);
						
						logger.fine("Found a path " + child);

						if (kind == ENTRY_CREATE) {
							try {
								processInstall(child);
							} catch (BundleException e) {
								logger.warning(e.getMessage());
							}
						} else if(kind == ENTRY_MODIFY) {
							try {
								processUpdate(child);
							} catch (BundleException e) {
								logger.warning(e.getMessage());
							}
						} else if(kind == ENTRY_DELETE) {
							try {
								processDelete(child);
							} catch (BundleException e) {
								logger.warning(e.getMessage());
							}
						}
					}
				}
			}

		});

	}