ADDITIONAL SYSTEM INFORMATION :
OS/X 10.15.7 Catalina
openjdk version "18-ea" 2022-03-15
OpenJDK Runtime Environment (build 18-ea+23-1525)
jdeps --version
18-ea
A DESCRIPTION OF THE PROBLEM :
As in synopsis. (Note the jlink subcomponent was the closest I could get
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Given a JavaFX class in the current directory I was wondering how I knew for sure what modules it would need.
So I tried this...
jdeps --module-path ~/Documents/javafx-sdk-17.0.1/lib --print-module-deps -cp . PushMe.class
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
java.base,javafx.controls
ACTUAL -
Exception in thread "main" java.io.UncheckedIOException: java.nio.file.FileSystemException: ./Pictures/Photos Library.photoslibrary: Operation not permitted
at java.base/java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:87)
at java.base/java.nio.file.FileTreeIterator.hasNext(FileTreeIterator.java:103)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:132)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at jdk.jdeps/com.sun.tools.jdeps.ClassFileReader$DirectoryReader.scan(ClassFileReader.java:225)
at jdk.jdeps/com.sun.tools.jdeps.ClassFileReader.entries(ClassFileReader.java:114)
at jdk.jdeps/com.sun.tools.jdeps.JdepsConfiguration.addPackagesInUnnamedModule(JdepsConfiguration.java:158)
at jdk.jdeps/com.sun.tools.jdeps.JdepsConfiguration.<init>(JdepsConfiguration.java:118)
at jdk.jdeps/com.sun.tools.jdeps.JdepsConfiguration$Builder.build(JdepsConfiguration.java:565)
at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.buildConfig(JdepsTask.java:604)
at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.run(JdepsTask.java:558)
at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.run(JdepsTask.java:534)
at jdk.jdeps/com.sun.tools.jdeps.Main.main(Main.java:49)
Caused by: java.nio.file.FileSystemException: ./Pictures/Photos Library.photoslibrary: Operation not permitted
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:420)
at java.base/java.nio.file.Files.newDirectoryStream(Files.java:482)
at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:301)
at java.base/java.nio.file.FileTreeWalker.next(FileTreeWalker.java:374)
at java.base/java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:83)
... 17 more
---------- BEGIN SOURCE ----------
None. Command line invocation in a directory with apparently inaccessible files. I was testing in my user.home directory.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
This works fine if you omit the -cp
jdeps --module-path ~/Documents/javafx-sdk-17.0.1/lib --print-module-deps PushMe.class
java.base,javafx.controls
Apparently including -cp triggers a search. In this specific case no search should be necessary. The two invocations are functionally equivalent - find the given class in the current directory.
This...
jdeps --module-path ~/Documents/javafx-sdk-17.0.1/lib --print-module-deps -cp . input/smiley.jar
also triggers the search error even though the exact path to the jar is provided. So possibly in other situations the search should be omitted as well?
FREQUENCY : always
OS/X 10.15.7 Catalina
openjdk version "18-ea" 2022-03-15
OpenJDK Runtime Environment (build 18-ea+23-1525)
jdeps --version
18-ea
A DESCRIPTION OF THE PROBLEM :
As in synopsis. (Note the jlink subcomponent was the closest I could get
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Given a JavaFX class in the current directory I was wondering how I knew for sure what modules it would need.
So I tried this...
jdeps --module-path ~/Documents/javafx-sdk-17.0.1/lib --print-module-deps -cp . PushMe.class
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
java.base,javafx.controls
ACTUAL -
Exception in thread "main" java.io.UncheckedIOException: java.nio.file.FileSystemException: ./Pictures/Photos Library.photoslibrary: Operation not permitted
at java.base/java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:87)
at java.base/java.nio.file.FileTreeIterator.hasNext(FileTreeIterator.java:103)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:132)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at jdk.jdeps/com.sun.tools.jdeps.ClassFileReader$DirectoryReader.scan(ClassFileReader.java:225)
at jdk.jdeps/com.sun.tools.jdeps.ClassFileReader.entries(ClassFileReader.java:114)
at jdk.jdeps/com.sun.tools.jdeps.JdepsConfiguration.addPackagesInUnnamedModule(JdepsConfiguration.java:158)
at jdk.jdeps/com.sun.tools.jdeps.JdepsConfiguration.<init>(JdepsConfiguration.java:118)
at jdk.jdeps/com.sun.tools.jdeps.JdepsConfiguration$Builder.build(JdepsConfiguration.java:565)
at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.buildConfig(JdepsTask.java:604)
at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.run(JdepsTask.java:558)
at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.run(JdepsTask.java:534)
at jdk.jdeps/com.sun.tools.jdeps.Main.main(Main.java:49)
Caused by: java.nio.file.FileSystemException: ./Pictures/Photos Library.photoslibrary: Operation not permitted
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:420)
at java.base/java.nio.file.Files.newDirectoryStream(Files.java:482)
at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:301)
at java.base/java.nio.file.FileTreeWalker.next(FileTreeWalker.java:374)
at java.base/java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:83)
... 17 more
---------- BEGIN SOURCE ----------
None. Command line invocation in a directory with apparently inaccessible files. I was testing in my user.home directory.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
This works fine if you omit the -cp
jdeps --module-path ~/Documents/javafx-sdk-17.0.1/lib --print-module-deps PushMe.class
java.base,javafx.controls
Apparently including -cp triggers a search. In this specific case no search should be necessary. The two invocations are functionally equivalent - find the given class in the current directory.
This...
jdeps --module-path ~/Documents/javafx-sdk-17.0.1/lib --print-module-deps -cp . input/smiley.jar
also triggers the search error even though the exact path to the jar is provided. So possibly in other situations the search should be omitted as well?
FREQUENCY : always
- links to
-
Review openjdk/jdk/6531