我在没有图形功能的 Ubuntu 服务器上开发,并从另一台计算机查看那里提供的网站。
编译到 ClojureScript 时,我得到了一个基本core.clj HeadlessException
的绘制函数。
我想保持服务器原样。这可能吗?如果没有,有人知道我需要获取什么图形包才能使用 Java 吗?
谢谢!
更新错误:
clojure.lang.Compiler$CompilerException: java.awt.HeadlessException, compiling:(visualizer.cljs:38:1)
at clojure.lang.Compiler$InvokeExpr.eval (Compiler.java:3628)
clojure.lang.Compiler$DefExpr.eval (Compiler.java:439)
clojure.lang.Compiler.eval (Compiler.java:6787)
clojure.lang.Compiler.load (Compiler.java:7227)
user$eval1902.invoke (form-init1559961897338794738.clj:1)
clojure.lang.Compiler.eval (Compiler.java:6782)
clojure.lang.Compiler.eval (Compiler.java:6745)
clojure.core$eval.invoke (core.clj:3081)
clojure.main$repl$read_eval_print__7099$fn__7102.invoke (main.clj:240)
clojure.main$repl$read_eval_print__7099.invoke (main.clj:240)
clojure.main$repl$fn__7108.invoke (main.clj:258)
clojure.main$repl.doInvoke (main.clj:258)
clojure.lang.RestFn.invoke (RestFn.java:1523)
clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__623.invoke (interruptible_eval.clj:58)
clojure.lang.AFn.applyToHelper (AFn.java:152)
clojure.lang.AFn.applyTo (AFn.java:144)
clojure.core$apply.invoke (core.clj:630)
clojure.core$with_bindings_STAR_.doInvoke (core.clj:1868)
clojure.lang.RestFn.invoke (RestFn.java:425)
clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke (interruptible_eval.clj:56)
clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__665$fn__668.invoke (interruptible_eval.clj:191)
clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__660.invoke (interruptible_eval.clj:159)
clojure.lang.AFn.run (AFn.java:22)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:615)
java.lang.Thread.run (Thread.java:745)
Caused by: java.awt.HeadlessException: null
at java.applet.Applet.<init> (Applet.java:67)
processing.core.PApplet.<init> (PApplet.java:159)
quil.Applet.<init> (:-1)
quil.applet$applet.doInvoke (applet.clj:448)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.lang.Compiler$InvokeExpr.eval (Compiler.java:3623)
clojure.lang.Compiler$DefExpr.eval (Compiler.java:439)
clojure.lang.Compiler.eval (Compiler.java:6787)
clojure.lang.Compiler.load (Compiler.java:7227)
user$eval1902.invoke (form-init1559961897338794738.clj:1)
clojure.lang.Compiler.eval (Compiler.java:6782)
clojure.lang.Compiler.eval (Compiler.java:6745)
clojure.core$eval.invoke (core.clj:3081)
clojure.main$repl$read_eval_print__7099$fn__7102.invoke (main.clj:240)
clojure.main$repl$read_eval_print__7099.invoke (main.clj:240)
clojure.main$repl$fn__7108.invoke (main.clj:258)
clojure.main$repl.doInvoke (main.clj:258)
clojure.lang.RestFn.invoke (RestFn.java:1523)
clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__623.invoke (interruptible_eval.clj:58)
clojure.lang.AFn.applyToHelper (AFn.java:152)
clojure.lang.AFn.applyTo (AFn.java:144)
clojure.core$apply.invoke (core.clj:630)
clojure.core$with_bindings_STAR_.doInvoke (core.clj:1868)
clojure.lang.RestFn.invoke (RestFn.java:425)
clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke (interruptible_eval.clj:56)
clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__665$fn__668.invoke (interruptible_eval.clj:191)
clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__660.invoke (interruptible_eval.clj:159)
clojure.lang.AFn.run (AFn.java:22)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:615)
java.lang.Thread.run (Thread.java:745)