The pre-compiled hfst-ol.jar fails on machines which run Java 1.6 and older, with the message
java.lang.UnsupportedClassVersionError: net/sf/hfst/HfstOptimizedLookup : Unsupported major.minor version 51.0
This is unfortunate because the users often do not have the option to upgrade the server installation and must make do with what they have. Support for Java 1.6 would be important.
A solution would be to set the target of javac to a bit older version (1.6? 1.5?).
http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html#crosscomp-options
This is a good suggestion. I implemented it, though am unable to test it on older Javas right now.
Sorry, the new file has the same problem as the previous one.
$ java -jar LIBS/hfst-ol.jar Exception in thread "main" java.lang.UnsupportedClassVersionError: net/sf/hfst/HfstOptimizedLookup : Unsupported major.minor version 51.0I googled around a bit, and here is a way to check the byte code version:
51 is java 7, 50 is java 6, 49 is java 5,...
http://stackoverflow.com/questions/10382929/unsupported-major-minor-version-51-0
Are you sure you got the newest version? I tried downloading just now and get:
Yes, I am sure. Tested again and it died. Digging into this further, different class files in the .jar have different versions:
Running
reveals a mixture of versions.
Thanks for all the help so far! Much appreciated, Sam.
Ah, of course, I neglected to do ant clean first. Now all the .classes should be rebuilt.
Tested to work. Thank you!