Damm. I always thought cross compilation of Java worked (i.e. compile in one
version with the target of a previous version). I guess it worked in my code
because I did not use any of the new features.  

Thank you very much Shawn. No, I'm not running SolrCloud, but I wanted to
use the new features in SolrJ particularly regarding the suggestions. Thank
you for confirming this though.

O. O.




Shawn Heisey-2 wrote
> Erick is right.  It won't even compile.  When the jump to Java 7 was
> made between the 4.7 and 4.8 releases, most of the source code was
> reviewed and certain pieces in a very large number of files were updated
> to code that only compiles in Java 7.  Many of those changes happened in
> SolrJ.  This was done because the Java 7 code is generally more reliable
> and easier to maintain.
> 
> Here's what happens when I import the 4.10 branch into eclipse and
> change the compiler compliance level to 1.6.  Notice the large number of
> red marks that are on source packages and java files:
> 
> https://www.dropbox.com/s/kktym6tsdi3iu36/solrj-4.10-java6-errors.png?dl=0
> 
> Your best bet is to download the 4.7 version and try to use that.  This
> is the last release that will work in Java 6:
> 
> http://archive.apache.org/dist/lucene/solr/4.7.2/
> 
> If you're NOT running SolrCloud, chances are VERY good that you can get
> this to work with zero problems.  If you're running SolrCloud on version
> 4.10 and try to use SolrJ 4.7, I would not be surprised to learn that
> they are not compatible.  It might work well ... I have never tried it.
> 
> The nature of the changes for Java 7 are such that it will be extremely
> time-consuming to backport changes between 4.7.2 and 4.10.4 to the older
> source code.
> 
> Thanks,
> Shawn





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Compiling-SolrJ-for-Java-6-tp4238068p4238095.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to