我從here下載了netty並解壓縮/解壓縮了它。在netty上運行丟棄服務器
現在,我想運行Discard Server,這是大多數netty教程中的第一個示例。我可以看到io/netty/example/discard/DiscardServer.class
,我知道這也有主要方法。
我的問題是:我如何運行丟棄服務器?
我試圖
java -jar netty-common-4.0.0.CR2.jar io.netty.example.discard.DiscardServer
這將產生:
Failed to load Main-Class manifest attribute from netty-common-4.0.0.CR2.jar
我試圖unjarring罐子,把主類名如下清單文件:
Main-Class: io.netty.example.discard.DiscardServer
運行罐子仍然給我錯誤:
Could not find the main class: io.netty.example.discard.DiscardServer. Program will exit.