Solr - 在 Windows 7 64 位上使用 64 位 Java,而不是 32 位 Java
我有一台 Windows 7 64 位机器。我的计算机上安装了 32 位和 64 位的 Java 运行时环境。当我启动 Solr 时,如何告诉 Solr 使用 64 位版本的 JRE?
I have a Windows 7 64-bit machine. I have Java Runtime Environment for both 32-bit and 64 bit installed on the machine. How do I tell Solr to use the 64-bit version of JRE when I start up Solr?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
假设您在 Tomcat 中运行 Solr:将
JAVA_HOME
环境变量设置为指向 64 位版本的 Java 而不是 32 位。然后在Tomcat中执行startup.bat
。其他 servlet 容器也应该观察 JAVA_HOME 环境变量,但我不能代表 Tomcat 以外的任何容器。
Assuming you are running Solr in Tomcat: Set your
JAVA_HOME
environment variable to point to the 64-bit version of Java instead of the 32-bit. Then executestartup.bat
in Tomcat.Other servlet containers should also be observing the JAVA_HOME environment variable, but I cannot speak for any other than Tomcat.
如果启动 SOLR 是指启动安装了 solr.war 的 Tomcat,那么您的问题实际上是如何告诉 Tomcat 使用 64 位 java。我没有确切的答案,但我认为你可以编辑 catalina.bat 文件。无论如何,谷歌一下 Tomcat + 64 位 java,看看会出现什么结果。
If, by, start up SOLR you mean start Tomcat with the solr.war installed, then your question is really about how to tell Tomcat to use 64 bit java. I don't have the answer exactly, but I think you can just edit the catalina.bat file. In any case, Google for Tomcat + 64-bit java and see what comes up.
感谢您的建议。但我发现我做错了什么。通过启动 Solr,我的意思是使用 Windows 命令提示符运行“java -jar start.jar”命令。要使用 64 位 JRE 启动 Solr,您必须使用 64 位 Windows 命令提示符。我不知道 Windows 命令提示符有两个不同版本(32 位和 64 位)。
Thanks for the suggestions. But I found out what I did wrong. By starting up Solr, I meant running the 'java -jar start.jar' command with the Windows Command Prompt. To start up Solr using the 64-bit JRE, you have to use the Windows Command Prompt for 64-bit. I wasn't aware of two different versions of the Windows Command Prompt (32-bit and 64-bit).