Building for Java 8

22 views
Skip to first unread message

Daniel Lurcock

unread,
Apr 17, 2023, 1:27:13 PM4/17/23
to efficient-java-matrix-library-discuss
Is it possible to build EJML for Java 8? Sorry, I'm not an expert (at all!) in Gradle or Maven :-( 
If someone could point me to some tips (or tell me that it can't be done for Java 8 so I should stop wasting my time...!), that would be really helpful.  Thanks in advance!

Peter A

unread,
Apr 18, 2023, 4:15:47 PM4/18/23
to efficient-java-mat...@googlegroups.com
This should be possible, but you will need to modify a few lines of code.

Jabel is used to allow it to use more modern syntax and generate backwards compatible bytecode. Look for a line in ejml/build.gradle that has "options.release = 11" and change it to "options.release = 8". The code base used to tbe Java 8 compatible until about this time last year. What you might run into is that it now calls a few functions that don't exist in Java 8. You will need to hunt those down and change it to something that is compatible with Java 8.

Having said that, if you don't need any of the new features / bug fixes you could just use an older version.

On Mon, Apr 17, 2023 at 10:27 AM Daniel Lurcock <dan...@lurcock.co.uk> wrote:
Is it possible to build EJML for Java 8? Sorry, I'm not an expert (at all!) in Gradle or Maven :-( 
If someone could point me to some tips (or tell me that it can't be done for Java 8 so I should stop wasting my time...!), that would be really helpful.  Thanks in advance!

--
You received this message because you are subscribed to the Google Groups "efficient-java-matrix-library-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to efficient-java-matrix-li...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/efficient-java-matrix-library-discuss/fdde5c3a-64c1-4341-9d46-417a6dc24d91n%40googlegroups.com.


--
"Now, now my good man, this is no time for making enemies."    — Voltaire (1694-1778), on his deathbed in response to a priest asking that he renounce Satan.

Daniel Lurcock

unread,
Apr 18, 2023, 4:35:50 PM4/18/23
to efficient-java-matrix-library-discuss
Thank you very much for your reply.
I found the lines in build.gradle but unfortunately, as you point out,  building with "options.release = 8" failed.
However, whilst initially I thought I needed the latest version for complex matrix support, it turns out that for my purposes I think these were supported adequately in 0.4.2, which seems to be working in Java 8 :-)
At some point I will need to migrate my project to a newer version of Java, but it will be quite a lot of work so I've been putting it off...!
Thanks for your help and all the best,
Daniel

Reply all
Reply to author
Forward
0 new messages