Wrote /root/JavaX-Caches/tmp_510034022/main.java - 1900 bytes (written=1900, should be 1900) javac=0, ecj=1, useJarBot=0 Checking ECJ at port 4898 at 127.0.0.1 /root/jdk-17/bin/javac -source 1.8 -target 1.8 -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_637142587 /root/JavaX-Caches/tmp_510034022/main.java 2>&1
[Compilation Error]

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

/root/JavaX-Caches/tmp_510034022/main.java:1: error: class, interface, or enum expected !7 ^ /root/JavaX-Caches/tmp_510034022/main.java:9: error: class, interface, or enum expected p { ^ /root/JavaX-Caches/tmp_510034022/main.java:12: error: class, interface, or enum expected runOnUiThread(r { ^ /root/JavaX-Caches/tmp_510034022/main.java:14: error: class, interface, or enum expected System.out.println("Cameras: " + n); ^ /root/JavaX-Caches/tmp_510034022/main.java:16: error: class, interface, or enum expected final Camera cam = Camera.open(0/*n-1*/); ^ /root/JavaX-Caches/tmp_510034022/main.java:18: error: class, interface, or enum expected Camera.Parameters p = cam.getParameters(); ^ /root/JavaX-Caches/tmp_510034022/main.java:19: error: class, interface, or enum expected p.setPreviewSize(100, 100); ^ /root/JavaX-Caches/tmp_510034022/main.java:20: error: class, interface, or enum expected cam.setParameters(p); ^ /root/JavaX-Caches/tmp_510034022/main.java:22: error: class, interface, or enum expected SurfaceView surfaceView = new SurfaceView(androidContext()); ^ /root/JavaX-Caches/tmp_510034022/main.java:23: error: class, interface, or enum expected SurfaceHolder surfaceHolder = surfaceView.getHolder(); ^ /root/JavaX-Caches/tmp_510034022/main.java:24: error: class, interface, or enum expected surfaceHolder.addCallback(new CamCallback()); ^ /root/JavaX-Caches/tmp_510034022/main.java:25: error: class, interface, or enum expected surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); ^ /root/JavaX-Caches/tmp_510034022/main.java:27: error: class, interface, or enum expected androidShow(surfaceView); ^ /root/JavaX-Caches/tmp_510034022/main.java:29: error: class, interface, or enum expected cam.setPreviewDisplay(surfaceHolder); ^ /root/JavaX-Caches/tmp_510034022/main.java:30: error: class, interface, or enum expected cam.startPreview(); ^ /root/JavaX-Caches/tmp_510034022/main.java:32: error: class, interface, or enum expected print("Preview started."); ^ /root/JavaX-Caches/tmp_510034022/main.java:34: error: class, interface, or enum expected surfaceView.post(r { ^ /root/JavaX-Caches/tmp_510034022/main.java:36: error: class, interface, or enum expected }); ^ /root/JavaX-Caches/tmp_510034022/main.java:38: error: class, interface, or enum expected print("Waiting for callback"); ^ /root/JavaX-Caches/tmp_510034022/main.java:39: error: class, interface, or enum expected }); ^ /root/JavaX-Caches/tmp_510034022/main.java:40: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_510034022/main.java:64: error: not a statement thread { ^ /root/JavaX-Caches/tmp_510034022/main.java:64: error: ';' expected thread { ^ 23 errors