安装京都大亨 - Java 时遇到问题。 Maven 失败
我通过以下方式下载了京都大亨: hxxps://bitbucket.org/EP/kyototycoon-java
运行 mvn install 时,我收到大量警告,告诉我找不到多个文件:
当我第一次开始运行安装时,我遇到了很多失败,但没有错误。在盲目地四处走动并尝试单独安装之后,输出现在看起来像这样。我没有使用 Maven 的经验,所以编辑 pom.xml 文件是不可能的。我尝试过使用忽略测试和编译,但得到的 jar 文件很少。这允许我使用以下方式编译“Example.java”:
javac -cp .:target/kyototycoon-0.2-SNAPSHOT.jar Example.java
然后尝试使用以下方式运行代码:
java -cp .:target/kyototycoon-0.2-SNAPSHOT.jar Example
但我收到运行时错误:
Exception in thread "main" java.lang.NoClassDefFoundError: Exception in thread "main" java.lang.NoClassDefFoundError: com/twitter/finagle/Codec
at kyototycoon.SimpleKyotoTycoonClient.<init>(SimpleKyotoTycoonClient.java:16)
at Example.main(Example.java:11)
Caused by: java.lang.ClassNotFoundException: com.twitter.finagle.Codec
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 2 more
我假设这一切都在 Maven 安装失败时返回,但我不知道如何修复它。
任何方向都值得赞赏。京都似乎没有一个大的支持团体。
I've downloaded Kyoto Tycoon via:
hxxps://bitbucket.org/EP/kyototycoon-java
When running mvn install I get plenty of warnings telling me it couldn't find several files:
When I first started running the install I was getting a lot of failures and no errors. After blindly going around and trying to install things separately, the output now looks like this. I have no experience with Maven so editing the pom.xml file is out of the question. I've tried using the ignore tests and compiling, and I get few jar files. This allows me to compile "Example.java" using:
javac -cp .:target/kyototycoon-0.2-SNAPSHOT.jar Example.java
I then try to run the code using:
java -cp .:target/kyototycoon-0.2-SNAPSHOT.jar Example
but I get an runtime error:
Exception in thread "main" java.lang.NoClassDefFoundError: Exception in thread "main" java.lang.NoClassDefFoundError: com/twitter/finagle/Codec
at kyototycoon.SimpleKyotoTycoonClient.<init>(SimpleKyotoTycoonClient.java:16)
at Example.main(Example.java:11)
Caused by: java.lang.ClassNotFoundException: com.twitter.finagle.Codec
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 2 more
I'm assuming this all comes back the the maven install failing, but I'm not sure how to fix it.
Any direction is appreciated. There doesn't seem to be a large support group for Kyoto.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于遇到同样问题的任何人,我发现正在创建我需要的 JAR 文件。它们被存储在 ~/.m2/repository/kyototycoon/kytotycoon/ 中。我创建了一个看起来令人作呕的类路径,其中包含所有这些 JAR 文件,这使我能够编译并运行 Example.java 文件。
For anyone experiencing this same issue, I found that JAR files I needed were being created. They were being stored in ~/.m2/repository/kyototycoon/kytotycoon/. I created a disgusting looking classpath that included all of these JAR files and this allowed me to compile AND run the Example.java file.
如果“编辑 pom 文件是不可能的”,我强烈建议避开 Maven。
在任何情况下,您都可以 将本地 jar 安装到您的存储库(如果该工件无法从任何存储库中获得)。
If "editing the pom file is out of the question" I'd strongly recommend steering clear of Maven.
In any case, you can install local jars to your repository if the artifact isn't available from any repository.