简体   繁体   English

Solr - 在Windows 7 64位上使用64位Java,而不是32位Java

[英]Solr - use 64-bit Java, not 32-bit Java on Windows 7 64-bit

I have a Windows 7 64-bit machine. 我有一台Windows 7 64位机器。 I have Java Runtime Environment for both 32-bit and 64 bit installed on the machine. 我在机器上安装了32位和64位的Java Runtime Environment。 How do I tell Solr to use the 64-bit version of JRE when I start up Solr? 当我启动Solr时,如何告诉Solr使用64位版本的JRE?

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. 假设您在Tomcat中运行Solr:将JAVA_HOME环境变量设置为指向64位版本的Java而不是32位。 Then execute startup.bat in Tomcat. 然后在Tomcat中执行startup.bat

Other servlet containers should also be observing the JAVA_HOME environment variable, but I cannot speak for any other than Tomcat. 其他servlet容器也应该是观察JAVA_HOME环境变量,但除了Tomcat之外我不能说话。

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. 如果,通过启动SOLR你的意思是在安装了solr.war的情况下启动Tomcat,那么你的问题就是如何告诉Tomcat使用64位java。 I don't have the answer exactly, but I think you can just edit the catalina.bat file. 我没有完全答案,但我认为你可以编辑catalina.bat文件。 In any case, Google for Tomcat + 64-bit java and see what comes up. 无论如何,谷歌为Tomcat + 64位java看看会出现什么。

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. 通过启动Solr,我的意思是使用Windows命令提示符运行'java -jar start.jar'命令。 To start up Solr using the 64-bit JRE, you have to use the Windows Command Prompt for 64-bit. 要使用64位JRE启动Solr,必须使用Windows命令提示符64位。 I wasn't aware of two different versions of the Windows Command Prompt (32-bit and 64-bit). 我不知道两个不同版本的Windows命令提示符(32位和64位)。

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

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