mdsplus icon indicating copy to clipboard operation
mdsplus copied to clipboard

MDSplus contains Java 6 source code which cannot be compiled with modern JDKs

Open mwinkel-dev opened this issue 1 year ago • 2 comments

Affiliation MIT PSFC

Version(s) Affected Stable and Alpha

Platform Ubuntu 20.04 with JDK 17

Describe the bug JDK 17 aborts with errors when attempting to build MDSplus with the Makefiles. The error message is

warning: [options] bootstrap class path not set in conjunction with -source 6
error: Source option 6 is no longer supported. Use 7 or later.

The Java 6 source is only found in "java/mdsobjects" and "java/mdsplus".

To Reproduce Steps to reproduce the behavior:

  • Remove all existing JDKs from your Linux system.
  • Install JDK 17 (the most recent JDK)
  • Do not use the Docker build
  • Instead build directly on your Linux system using the Makefile process (bootstrap, configure, make)

Expected behavior Was expecting JDK 17 to build all the java files. Was surprised that some source files were still on Java 6.

Screenshots n/a

Additional context This is more of a policy decision than a bug. The Docker build system uses an older JDK and thus is able to build the old Java 6 source. Question is thus whether the MDSplus project should upgrade to newer Java source and a newer JDK.

mwinkel-dev avatar May 09 '23 14:05 mwinkel-dev

In the MDSplus debian bullseye Dockerfile, line 42, I see that you are installing default-jdk this installs openjdk 11.0.20 which is fine.

However, on debian bookworm, default-jdk installs openjdk 17.0.8 and there are no older versions of openjdk available in the apt package registry.

pfbuxton avatar Oct 20 '23 19:10 pfbuxton

Update: Following an older issue #2560, doing: make JAVASOURCE=8 works as expected.

pfbuxton avatar Oct 21 '23 11:10 pfbuxton

@WhoBrokeTheBuild fixed this issue with PR #2747.

mwinkel-dev avatar Apr 24 '24 20:04 mwinkel-dev