Wrote /root/JavaX-Caches/tmp_1903540092/main.java - 197 bytes (written=197, should be 197) javac=0, ecj=1 Checking ECJ at port 4898 at 127.0.0.1 ecj -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_1507232941 /root/JavaX-Caches/tmp_1903540092/main.java [Compilation Error]

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

main$JavaCompileException: ECJ returned errors. ---------- 1. ERROR in /root/JavaX-Caches/tmp_1903540092/main.java (at line 1) static Color toColor(RGB rgb) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Syntax error on token(s), misplaced construct(s) ---------- 2. ERROR in /root/JavaX-Caches/tmp_1903540092/main.java (at line 1) static Color toColor(RGB rgb) { ^^^^^ Syntax error on token "Color", @ expected ---------- 3. ERROR in /root/JavaX-Caches/tmp_1903540092/main.java (at line 1) static Color toColor(RGB rgb) { ^^^ Syntax error on token(s), misplaced construct(s) ---------- 4. ERROR in /root/JavaX-Caches/tmp_1903540092/main.java (at line 2) ret rgb == null ? null : rgb.getColor(); ^^^ Syntax error on token "ret", return expected ---------- 5. ERROR in /root/JavaX-Caches/tmp_1903540092/main.java (at line 2) ret rgb == null ? null : rgb.getColor();\r } ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Syntax error on tokens, delete these tokens ---------- 6. ERROR in /root/JavaX-Caches/tmp_1903540092/main.java (at line 5) static Color toColor(int rgb) { ^^^^^^^ Syntax error on token "toColor", = expected after this token ---------- 7. ERROR in /root/JavaX-Caches/tmp_1903540092/main.java (at line 5) static Color toColor(int rgb) { ^^^^^^^^^ Syntax error on token(s), misplaced construct(s) ---------- 8. ERROR in /root/JavaX-Caches/tmp_1903540092/main.java (at line 5) static Color toColor(int rgb) { ^^^ Syntax error on token(s), misplaced construct(s) ---------- 9. ERROR in /root/JavaX-Caches/tmp_1903540092/main.java (at line 6) ret new Color(rgb); ^^^ Syntax error on token(s), misplaced construct(s) ---------- 10. ERROR in /root/JavaX-Caches/tmp_1903540092/main.java (at line 6) ret new Color(rgb);\r }\r \r static Color toColor(S hex) { ^^^^^^^^^^^^^^^^^^^^^^^^ Syntax error on tokens, delete these tokens ---------- 11. ERROR in /root/JavaX-Caches/tmp_1903540092/main.java (at line 9) static Color toColor(S hex) { ^^^ Syntax error on token "hex", ) expected ---------- 12. ERROR in /root/JavaX-Caches/tmp_1903540092/main.java (at line 10) ret awtColor(hex); ^^^ Syntax error, insert "... VariableDeclaratorId" to complete FormalParameterList ---------- 13. ERROR in /root/JavaX-Caches/tmp_1903540092/main.java (at line 11) } ^ Syntax error, insert "}" to complete ArrayInitializer ---------- 14. ERROR in /root/JavaX-Caches/tmp_1903540092/main.java (at line 11) } ^ Syntax error, insert ";" to complete BlockStatementopt ---------- 14 problems (14 errors) Options file: /tmp/javax4198500677597067708