Netty Eclipse“没有强制性的外部依赖项”?导入错误
我刚刚从这里下载了用于个人客户端-服务器项目的 Netty: http://netty.io/downloads/netty-3.3.0 .Final-dist.tar.bz2 在下载页面 http://netty.io/downloads/ 它说“没有强制性的外部依赖项” 。您只需要 JDK 1.5 或更高版本。所以我只是使用我的 1.6 JDK 在 eclipse IDE 中设置了一个 java 项目,并收到多个错误,提示“导入无法解析”。
示例: org.jboss.logging
、com.google
、org.osgi
、javax.servlet
这告诉我,有实际上是需要一些外部库。还是我做错了什么?
谁能告诉我在哪里可以找到所有这些库,因为我在 Netty 页面上找不到任何线索(我知道 javax.servlet 是 Tomcat 和 JBoss AS 发行版的一部分,但为什么他们说没有外部需要库)。
I just downloaded Netty for a personal client-server-project from here:
http://netty.io/downloads/netty-3.3.0.Final-dist.tar.bz2
On the download page http://netty.io/downloads/ it says there are "no mandatory external dependencies". You only need a JDK 1.5 or higher. So I just set up a java project in eclipse IDE using my 1.6 JDK and got multiple errors saying "import cannot be resolved".
Examples:org.jboss.logging
, com.google
, org.osgi
, javax.servlet
That tells me that there are actually some external libraries needed. Or am I doing anything wrong?
Can anyone tell me where to find all these libraries since I could not find any clues on the Netty pages where to get them (I know that javax.servlet is part of Tomcat and JBoss AS distribution, but why do they then say that no external libraries are needed).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你想从源代码构建 netty 吗?根目录下有一个
pom.xml
文件,暗示netty可以通过maven构建。您将在 pom 文件中找到所有这些依赖项。 “无强制外部依赖”意味着除了 netty jar 之外,您不需要任何 jar 来运行您的应用程序。某些示例可能需要外部依赖项,最终用于测试,也许还需要一些特殊但可选的运行时功能。Are you trying to build netty from source? There's a
pom.xml
file in the root, implying that netty can be built by maven. You'll find all those dependencies in the pom file. "No mandatory external dependencies" means that you need no jar other than the netty jar to run your application. External dependecies is probably needed for some of the examples, definitively for testing and perhaps for some special, but optional, run time features.依赖项仅用于构建并标记为可选。仅当您想要使用 slf4j 登录 netty 时才需要依赖项。除此之外,netty 可以在您的项目中使用,而无需引入任何第三方依赖项。
The dependencies are only used for building and are marked as optional. The dependencies are only needed if you want for example use slf4j for logging in netty. Beside this netty can be used within your project without pulling in any third-party dependencies.