Closed remkop closed 4 years ago
That sounds great.
I have no problems in jumping to Java14. We have no production code we have to worry about. And this is a great way of learning.
BTW @remkop and @Gilad Denneboom feel free to add Java8-14 idioms where they
make sense. I'll try to learn. One area that is likely to be useful is
optional
because unexpected null
s are very common .
On Tue, Mar 31, 2020 at 3:46 AM Remko Popma notifications@github.com wrote:
Investigate the jpackage tool that is included https://openjdk.java.net/jeps/343 in Java 14.
From the documentation:
The jpackage tool packages a Java application into a platform-specific package that includes all of the necessary dependencies. The application may be provided as a collection of ordinary JAR files or as a collection of modules. The supported platform-specific package formats are:
- Linux: deb and rpm
- macOS: pkg and dmg
- Windows: msi and exe
It may be possible to add this to the Maven build, with plugins like jlink-jpackager-maven-plugin https://github.com/agilhard-oss/jlink-jpackager-maven-plugin.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/petermr/ami3/issues/17, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFTCS2PMGIK2EHFLA2ZHLDRKFKSHANCNFSM4LXFSSWQ .
-- Peter Murray-Rust Founder ContentMine.org and Reader Emeritus in Molecular Informatics Dept. Of Chemistry, University of Cambridge, CB2 1EW, UK
If NPE's are a common problem, then just running the program on Java 14 will help, since they introduced "helpful NullPointerExceptions" that look something like this
Exception in thread "main" java.lang.NullPointerException:
Cannot assign field "i" because "a" is null
at Prog.main(Prog.java:5)
instead of the "old" way, which looked like this:
Exception in thread "main" java.lang.NullPointerException
at Prog.main(Prog.java:5)
Great! we'll move to Java14. I'll also gradually try to clean up tests but it's a long process.
On Tue, Mar 31, 2020 at 10:35 AM Remko Popma notifications@github.com wrote:
If NPE's are a common problem, then just running the program on Java 14 will help, since they introduced "helpful NullPointerExceptions https://openjdk.java.net/jeps/358" that look something like this
Exception in thread "main" java.lang.NullPointerException: Cannot assign field "i" because "a" is null at Prog.main(Prog.java:5)
instead of the "old" way, which looked like this:
Exception in thread "main" java.lang.NullPointerException at Prog.main(Prog.java:5)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/petermr/ami3/issues/17#issuecomment-606511228, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFTCS6VTMFDZ3XVX43WJ7DRKG2OXANCNFSM4LXFSSWQ .
-- Peter Murray-Rust Founder ContentMine.org and Reader Emeritus in Molecular Informatics Dept. Of Chemistry, University of Cambridge, CB2 1EW, UK
Closing, since with the work on #24 and #51 we now have a publishing pipeline that results in a zip/bz2 archive with launcher scripts and required jars. Artifacts are hosted by GitHub Packages: https://github.com/petermr/ami3/packages/
The equivalent jpackage solution would include a (minimized) version of the JRE. This would add another 30-40MB to the download, but would allow users to run ami
without installing Java.
For our current purposes, our current solution is sufficient.
Investigate the
jpackage
tool that is included in Java 14.From the documentation:
It may be possible to add this to the Maven build, with plugins like jlink-jpackager-maven-plugin.