Wrote /root/JavaX-Caches/tmp_535496882/main.java - 3048 bytes (written=3048, should be 3048) javac=0, ecj=1, useJarBot=0 Checking ECJ at port 4898 at 127.0.0.1 /root/jdk-17/bin/javac -source 11 -target 11 -nowarn -encoding utf8 -Xdiags:verbose -cp /root/.javax/x30.jar:/root/dexcompiler/android.jar:/root/dexcompiler/support-v4-22.2.1.jar:/root/javafx/javafx.base.jar:/root/javafx/javafx.graphics.jar:/root/javafx/javafx.swing.jar -d /root/JavaX-Caches/tmp_1420946841 /root/JavaX-Caches/tmp_535496882/main.java 2>&1
[Compilation Error]

Compiler errors. Medium transpile. Show Java sources. Show snippet. Edit.

/root/JavaX-Caches/tmp_535496882/main.java:1: error: class, interface, or enum expected sclass RecursiWatcherService extends AutoCloseable { ^ /root/JavaX-Caches/tmp_535496882/main.java:3: error: class, interface, or enum expected WatchService watcher; ^ /root/JavaX-Caches/tmp_535496882/main.java:4: error: class, interface, or enum expected ExecutorService executor; ^ /root/JavaX-Caches/tmp_535496882/main.java:6: error: class, interface, or enum expected public void init() throws IOException { ^ /root/JavaX-Caches/tmp_535496882/main.java:8: error: class, interface, or enum expected executor = Executors.newSingleThreadExecutor(); ^ /root/JavaX-Caches/tmp_535496882/main.java:9: error: class, interface, or enum expected startRecursiveWatcher(); ^ /root/JavaX-Caches/tmp_535496882/main.java:10: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_535496882/main.java:12: error: class, interface, or enum expected void cleanMeUp() { close(); } ^ /root/JavaX-Caches/tmp_535496882/main.java:13: error: class, interface, or enum expected public void close() { ^ /root/JavaX-Caches/tmp_535496882/main.java:14: error: class, interface, or enum expected pcall { watcher.close(); } ^ /root/JavaX-Caches/tmp_535496882/main.java:16: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_535496882/main.java:21: error: class, interface, or enum expected final Map<WatchKey, Path> keys = new HashMap<>(); ^ /root/JavaX-Caches/tmp_535496882/main.java:23: error: class, interface, or enum expected Consumer<Path> register = p -> { ^ /root/JavaX-Caches/tmp_535496882/main.java:26: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_535496882/main.java:30: error: class, interface, or enum expected public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { ^ /root/JavaX-Caches/tmp_535496882/main.java:32: error: class, interface, or enum expected WatchKey watchKey = dir.register(watcher, new WatchEvent.Kind[]{ENTRY_CREATE}, SensitivityWatchEventModifier.HIGH); ^ /root/JavaX-Caches/tmp_535496882/main.java:33: error: class, interface, or enum expected keys.put(watchKey, dir); ^ /root/JavaX-Caches/tmp_535496882/main.java:34: error: class, interface, or enum expected return FileVisitResult.CONTINUE; ^ /root/JavaX-Caches/tmp_535496882/main.java:35: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_535496882/main.java:37: error: class, interface, or enum expected } catch (IOException e) { ^ /root/JavaX-Caches/tmp_535496882/main.java:39: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_535496882/main.java:42: error: class, interface, or enum expected register.accept(rootFolder.toPath()); ^ /root/JavaX-Caches/tmp_535496882/main.java:44: error: class, interface, or enum expected executor.submit(() -> { ^ /root/JavaX-Caches/tmp_535496882/main.java:46: error: class, interface, or enum expected final WatchKey key; ^ /root/JavaX-Caches/tmp_535496882/main.java:47: error: class, interface, or enum expected try { ^ /root/JavaX-Caches/tmp_535496882/main.java:49: error: class, interface, or enum expected } catch (InterruptedException ex) { ^ /root/JavaX-Caches/tmp_535496882/main.java:51: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_535496882/main.java:53: error: class, interface, or enum expected final Path dir = keys.get(key); ^ /root/JavaX-Caches/tmp_535496882/main.java:54: error: class, interface, or enum expected if (dir == null) { ^ /root/JavaX-Caches/tmp_535496882/main.java:56: error: class, interface, or enum expected continue; ^ /root/JavaX-Caches/tmp_535496882/main.java:57: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_535496882/main.java:63: error: class, interface, or enum expected final Path absPath = dir.resolve(p); ^ /root/JavaX-Caches/tmp_535496882/main.java:64: error: class, interface, or enum expected if (absPath.toFile().isDirectory()) { ^ /root/JavaX-Caches/tmp_535496882/main.java:66: error: class, interface, or enum expected } else { ^ /root/JavaX-Caches/tmp_535496882/main.java:67: error: class, interface, or enum expected final File f = absPath.toFile(); ^ /root/JavaX-Caches/tmp_535496882/main.java:68: error: class, interface, or enum expected LOG.info("Detected new file " + f.getAbsolutePath()); ^ /root/JavaX-Caches/tmp_535496882/main.java:69: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_535496882/main.java:72: error: class, interface, or enum expected boolean valid = key.reset(); // IMPORTANT: The key must be reset after processed ^ /root/JavaX-Caches/tmp_535496882/main.java:73: error: class, interface, or enum expected if (!valid) { ^ /root/JavaX-Caches/tmp_535496882/main.java:75: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_535496882/main.java:78: error: class, interface, or enum expected } ^ 41 errors