我在Windows上,这是我在heroku上的第一次Java部署,而且我对heroku很新。
遵循this指南,当我想访问应用网址时,我会看到此屏幕:
这是我的heroku日志:
C:\Users\Luca\workspace\ScacchiCopia>heroku open
Opening gentle-mesa-xxxx... done
C:\Users\Luca\workspace\ScacchiCopia>heroku logs
2015-08-05T14:23:46.657148+00:00 app[web.1]: at java.awt.Window.<init>(Window
.java:536)
2015-08-05T14:23:46.657236+00:00 app[web.1]: at java.awt.Frame.<init>(Frame.j
ava:420)
2015-08-05T14:23:46.657323+00:00 app[web.1]: at java.awt.Frame.<init>(Frame.j
ava:385)
2015-08-05T14:23:46.657416+00:00 app[web.1]: at javax.swing.JFrame.<init>(JFr
ame.java:189)
2015-08-05T14:23:46.657517+00:00 app[web.1]: at ChessBoard_SO.<init>(ChessBoa
rd_SO.java:11)
2015-08-05T14:23:46.657610+00:00 app[web.1]: at ChessBoard_SO.main(ChessBoard
_SO.java:395)
2015-08-05T14:23:47.551943+00:00 heroku[web.1]: State changed from starting to c
rashed
2015-08-05T14:23:47.538227+00:00 heroku[web.1]: Process exited with status 1
2015-08-05T20:05:21.031881+00:00 heroku[web.1]: State changed from crashed to st
arting
2015-08-05T20:05:26.099109+00:00 heroku[web.1]: Starting process with command `j
ava -cp target/classes:target/dependency/* ChessBoard_SO`
2015-08-05T20:05:28.319274+00:00 app[web.1]: Exception in thread "main" java.awt
.HeadlessException:
2015-08-05T20:05:28.319410+00:00 app[web.1]: No X11 DISPLAY variable was set, bu
t this program performed an operation which requires it.
2015-08-06T07:50:21.301050+00:00 heroku[web.1]: Starting process with command `j
ava -cp target/classes:target/dependency/* ChessBoard_SO`
2015-08-07T07:02:28.708591+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/" host=gentle-mesa-8436.herokuapp.com request_id=9daeabf
a-1dd3-4277-8833-785bdae9af93 fwd="79.41.230.143" dyno= connect= service= status
=503 bytes=
2015-08-07T07:02:29.588019+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/favicon.ico" host=gentle-mesa-xxxx.herokuapp.com request
_id=97a466fd-b315-42d8-8976-7829e19cc778 fwd="79.41.230.143" dyno= connect= serv
ice= status=503 bytes=
答案 0 :(得分:0)
您尝试运行的应用程序是基于GUI的应用程序(图形用户界面)。这不会在远程服务器上工作(这是&#34;无头&#34;)。