简体   繁体   English

有人可以帮助我解决在64位Windows 8.1系统上与Java,Ant和Eclipse产生的令人沮丧的冲突吗?

[英]Can somebody help me resolve some frustrating conflicts with Java, Ant, and Eclipse on a 64 bit Windows 8.1 system?

Background: I'm setting up an automated build system, with Selenium (Java), Ant, Eclipse and Jenkins on a virtual machine running a 64 bit version of Windows 8.1. 背景:我正在运行64位版本Windows 8.1的虚拟机上使用Selenium(Java),Ant,Eclipse和Jenkins建立一个自动构建系统。

Problem #1- The latest version of the 64 bit JDK (1.8.0.72) doesn't seem to include tools.jar, which ant (version 1.9.6) seems to depend on. 问题#1- 64位JDK(1.8.0.72)的最新版本似乎不包含tools.jar,而ant(版本1.9.6)似乎依赖于此。 My solution has been to download the 32 bit version of the JDK and set all environmental variables accordingly. 我的解决方案是下载32位版本的JDK,并相应地设置所有环境变量。

Which leads to Problem #2- Now that I have reset my environment to point to the 32 bit JDK, I can no longer start Eclipse without an error message “Failed to load the JNI shared library.” I have tried to resolve this error by adding a line to my eclipse config file to point to the correct JVM (jvm.dll), but that isn't working. 导致问题2的出现。现在,我已将环境重置为指向32位JDK,因此我无法再启动Eclipse,而没有出现错误消息“无法加载JNI共享库”。在我的eclipse配置文件中添加一行以指向正确的JVM(jvm.dll),但这不起作用。

Thanks for the quick suggestions. 感谢您的快速建议。 I have come up with a solution (or at least a decent workaround). 我想出了一个解决方案(或者至少是一个不错的解决方法)。

Download 32 bit and the 64 bit version of the JDK. 下载32位和64位版本的JDK。 Set my JAVA_HOME var to point to the 64 bit JDK, which satisfies Eclipse, and then copy the tools.jar file included with the 32 bit JDK to the 64 bit JDK. 将我的JAVA_HOME var设置为指向满足Eclipse的64位JDK,然后将32位JDK附带的tools.jar文件复制到64位JDK。 Not very elegant, but for now it seems to be working. 不是很优雅,但是目前看来,它正在工作。 Ant and Eclipse are both happy. Ant和Eclipse都很高兴。

It is strange that downloading the 64 bit version of the JDK doesn't include tools.jar. 奇怪的是,下载64位版本的JDK不包含tools.jar。 I tried 8u71 and 8u72 for windows 64 bit without any luck. 我为Windows 64位尝试了8u71和8u72,但没有任何运气。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM