I wanted to install Solr 6.0.1 on my brand new laptop for Sitecore 8.2 after I already installed Solr 7.2.1 for Sitecore 9.1. I thought it will be easy because I have already a Java environment installed. I had 2 issues.
1. The obvious – “Java 1.8 or later is required to run Solr. Current Java version is: 9.0.1”
So, solr.cmd says 9.0.1 is lower than 1.8, yeah, I see… This does not make any sense, so I just commented out the following lines from bin\solr.cmd because I know I have a correct version.
Great, problem solved, yeah, this problem actually, then the next problem popped up:
2. The surprise – “Unrecognized VM option ‘PrintHeapAtGC'”
Alright, I thought then I need to comment out some more lines from the bin\solr.cmd. But no because there were not search result in the file for “PrintHeapAtGC”. Just to be clear the exact error message was the following:
So, I checked the other files and I found this bastard in the bin\solr.in.cmd. I had to modify the parameters of GC_LOG_OPTS to the following:
I don’t know if it will cause any problem on a local machine for Sitecore development but don’t do it on production for sure! Hope it helped you out.