出错的代码:
val unidataDir = "/home/idv/unidata/idv/DefaultIdv"
val idvSvr = new IdvServer(new File(unidataDir))
错误报告:
> run
[info] Running barnes.IDVServer
[error] (run-main-1) java.lang.NoClassDefFoundError: Could not initialize class javax.swing.RepaintManager
java.lang.NoClassDefFoundError: Could not initialize class javax.swing.RepaintManager
at javax.swing.JComponent.repaint(JComponent.java:4793)
at java.awt.Component.repaint(Component.java:3297)
at javax.swing.text.JTextComponent.setEditable(JTextComponent.java:1807)
at javax.swing.text.JTextComponent.<init>(JTextComponent.java:319)
at javax.swing.JTextArea.<init>(JTextArea.java:204)
at javax.swing.JTextArea.<init>(JTextArea.java:164)
at ucar.unidata.util.LogUtil.checkConsole(LogUtil.java:690)
at ucar.unidata.util.LogUtil.consoleMessage(LogUtil.java:702)
at ucar.unidata.util.LogUtil.printException(LogUtil.java:897)
at ucar.unidata.util.LogUtil.printException(LogUtil.java:817)
at ucar.unidata.idv.IntegratedDataViewer.logException(IntegratedDataViewer.java:3072)
at ucar.unidata.idv.IntegratedDataViewer.<init>(IntegratedDataViewer.java:310)
at ucar.unidata.idv.IdvServer$MyIdv.<init>(IdvServer.java:133)
at ucar.unidata.idv.IdvServer.<init>(IdvServer.java:57)
at barnes.IDVServer$.<init>(IDVServer.scala:16)
at barnes.IDVServer$.<clinit>(IDVServer.scala)
at barnes.IDVServer.main(IDVServer.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
[trace] Stack trace suppressed: run last compile:run for the full output.
java.lang.RuntimeException: Nonzero exit code: 1
at scala.sys.package$.error(package.scala:27)
[trace] Stack trace suppressed: run last compile:run for the full output.
[error] (compile:run) Nonzero exit code: 1
[error] Total time: 0 s, completed 2014-10-11 19:33:18
错误原因:
初步猜测是unidataDir中包含的内容不对,下一步需要验证