Wrote /root/JavaX-Caches/tmp_641800136/main.java - 1343 bytes (written=1343, should be 1343) 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_2113423446 /root/JavaX-Caches/tmp_641800136/main.java 2>&1
[Compilation Error]

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

/root/JavaX-Caches/tmp_641800136/main.java:2: error: class, interface, or enum expected static void addHistoryToTextField(final JTextField input) { ^ /root/JavaX-Caches/tmp_641800136/main.java:2: error: class, interface, or enum expected static void addHistoryToTextField(final JTextField input) { ^ /root/JavaX-Caches/tmp_641800136/main.java:3: error: class, interface, or enum expected final Var<Int> historyIdx = new Var(0); ^ /root/JavaX-Caches/tmp_641800136/main.java:4: error: class, interface, or enum expected final new L<S> history; ^ /root/JavaX-Caches/tmp_641800136/main.java:5: error: class, interface, or enum expected input.addKeyListener(new KeyAdapter { ^ /root/JavaX-Caches/tmp_641800136/main.java:6: error: class, interface, or enum expected public void keyPressed(KeyEvent e) { ^ /root/JavaX-Caches/tmp_641800136/main.java:10: error: class, interface, or enum expected historyIdx.set(max(0, historyIdx.get()-1)); ^ /root/JavaX-Caches/tmp_641800136/main.java:11: error: class, interface, or enum expected S text = get(history, historyIdx.get()); ^ /root/JavaX-Caches/tmp_641800136/main.java:12: error: class, interface, or enum expected if (text != null) { ^ /root/JavaX-Caches/tmp_641800136/main.java:14: error: class, interface, or enum expected input.selectAll(); ^ /root/JavaX-Caches/tmp_641800136/main.java:15: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_641800136/main.java:21: error: class, interface, or enum expected if (historyIdx.get() < l(history) || ^ /root/JavaX-Caches/tmp_641800136/main.java:24: error: class, interface, or enum expected historyIdx.set(min(l(history), historyIdx.get()+1)); ^ /root/JavaX-Caches/tmp_641800136/main.java:25: error: class, interface, or enum expected text = get(history, historyIdx.get()); ^ /root/JavaX-Caches/tmp_641800136/main.java:26: error: class, interface, or enum expected input.setText(unnull(text)); ^ /root/JavaX-Caches/tmp_641800136/main.java:27: error: class, interface, or enum expected input.selectAll(); ^ /root/JavaX-Caches/tmp_641800136/main.java:28: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_641800136/main.java:32: error: class, interface, or enum expected input.addActionListener(actionListener { ^ /root/JavaX-Caches/tmp_641800136/main.java:35: error: class, interface, or enum expected while (history.contains("")) history.remove(""); ^ /root/JavaX-Caches/tmp_641800136/main.java:36: error: class, interface, or enum expected history.remove(text); ^ /root/JavaX-Caches/tmp_641800136/main.java:37: error: class, interface, or enum expected history.add(text); ^ /root/JavaX-Caches/tmp_641800136/main.java:38: error: class, interface, or enum expected historyIdx.set(l(history)); ^ /root/JavaX-Caches/tmp_641800136/main.java:39: error: class, interface, or enum expected }); ^ /root/JavaX-Caches/tmp_641800136/main.java:40: error: class, interface, or enum expected } ^ 24 errors