We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I ran into a problem with building BigVolumeViewer with JDK 11 (and Maven).
pietzsch@mycroft:~/workspace/bigdataviewer/bigvolumeviewer-core (master)$ mvn clean install # 1 [15:22:38] [INFO] Scanning for projects... [INFO] [INFO] ----------------------< sc.fiji:bigvolumeviewer >----------------------- [INFO] Building BigVolumeViewer 0.3.2-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- ... [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ bigvolumeviewer --- [INFO] Compiling 103 source files to /Users/pietzsch/workspace/bigdataviewer/bigvolumeviewer-core/target/classes [INFO] /Users/pietzsch/workspace/bigdataviewer/bigvolumeviewer-core/src/main/java/bvv/vistools/BvvFunctions.java: Some input files use or override a deprecated API. [INFO] /Users/pietzsch/workspace/bigdataviewer/bigvolumeviewer-core/src/main/java/bvv/vistools/BvvFunctions.java: Recompile with -Xlint:deprecation for details. [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /Users/pietzsch/workspace/bigdataviewer/bigvolumeviewer-core/src/main/java/bvv/core/blocks/ByteUtils.java:[36,16] package sun.misc does not exist [ERROR] /Users/pietzsch/workspace/bigdataviewer/bigvolumeviewer-core/src/main/java/bvv/core/blocks/ByteUtils.java:[41,30] cannot find symbol symbol: class Unsafe location: class bvv.core.blocks.ByteUtils [INFO] 2 errors [INFO] ------------------------------------------------------------- ...
This can be traced back to the maven-compiler-plugin configuring javac with --release 8.
maven-compiler-plugin
javac
--release 8
The problem is that --release 8 works slightly different that the old-style -source 1.8 -target 1.8. See https://bugs.openjdk.org/browse/JDK-8214165, https://bugs.openjdk.org/browse/JDK-8206937, https://mail.openjdk.org/pipermail/compiler-dev/2018-January/011583.html. The spec for --release N is to provide access to the public documented API for JDK N. The sun.misc package is not public documented API.
-source 1.8 -target 1.8
--release N
JDK N
sun.misc
Ironically, if we were targeting Java 11, there would be no problem. --release 11 would work, because there is the jdk.unsupported module ...
--release 11
jdk.unsupported
Anyway... I think this can be traced to
pom-scijava-base/pom.xml
Lines 2107 to 2125 in 8920b4f
<maven.compiler.release>
The only way I found to fix that in BigVolumeViewer's pom.xml is bigdataviewer/bigvolumeviewer-core@ffaf291 https://github.com/bigdataviewer/bigvolumeviewer-core/blob/ffaf291987da4ea3e4ca9796a700b43c5209c8be/pom.xml#L83-L95
It would be nicer to address this higher up, but I don't know how pom-scijava-base should be changed exactly, and what side effects would be.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I ran into a problem with building BigVolumeViewer with JDK 11 (and Maven).
This can be traced back to the
maven-compiler-plugin
configuringjavac
with--release 8
.The problem is that
--release 8
works slightly different that the old-style-source 1.8 -target 1.8
.See https://bugs.openjdk.org/browse/JDK-8214165, https://bugs.openjdk.org/browse/JDK-8206937, https://mail.openjdk.org/pipermail/compiler-dev/2018-January/011583.html.
The spec for
--release N
is to provide access to the public documented API forJDK N
. Thesun.misc
package is not public documented API.Ironically, if we were targeting Java 11, there would be no problem.
--release 11
would work, because there is thejdk.unsupported
module ...Anyway... I think this can be traced to
pom-scijava-base/pom.xml
Lines 2107 to 2125 in 8920b4f
where the
<maven.compiler.release>
property is set.The only way I found to fix that in BigVolumeViewer's pom.xml is bigdataviewer/bigvolumeviewer-core@ffaf291
https://github.com/bigdataviewer/bigvolumeviewer-core/blob/ffaf291987da4ea3e4ca9796a700b43c5209c8be/pom.xml#L83-L95
It would be nicer to address this higher up, but I don't know how pom-scijava-base should be changed exactly, and what side effects would be.
The text was updated successfully, but these errors were encountered: