Skip to content

CodeAnalyzer cannot be run successfully with the default VM used in newer Eclipse installs #63

Description

@scottkurz

Eclipse 2024-06 comes configured with a Java 22 version of Hotspot OpenJDK configured by default. Setting the JAVA_HOME accordingly and running with this 'java' executable on Windows, I get the error below.

If this is an attempt to detect JDK vs JRE then I think it is incomplete. This distribution certainly has a JDK, it's able to do javac.

It does have a jre/bin/jmod.exe but not 'jmods'.

$ 
java  -jar "....codeanalyzer-20241014T185711.jar"  -i C:\git\apps\sample-app-mod -o "....\modresorts" -a 2 --no-build                                                                                 

 java.lang.RuntimeException: java.nio.file.NoSuchFileException:....\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_22.0.2.v20240802-1626\jre\jmods
        at com.ibm.northstar.CodeAnalyzer.run(CodeAnalyzer.java:96)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1767)
        at picocli.CommandLine.access$900(CommandLine.java:145)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2139)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2106)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1973)
        at picocli.CommandLine.execute(CommandLine.java:1902)
        at com.ibm.northstar.CodeAnalyzer.main(CodeAnalyzer.java:85)
Caused by: java.nio.file.NoSuchFileException: ....\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_22.0.2.v20240802-1626\jre\jmods
        at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
        at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53)
        at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
        at java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:197)
        at java.base/java.nio.file.Files.readAttributes(Files.java:1858)
        at java.base/java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:220)
        at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:277)
        at java.base/java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:323)
        at java.base/java.nio.file.FileTreeIterator.<init>(FileTreeIterator.java:71)
        at java.base/java.nio.file.Files.walk(Files.java:3903)
        at java.base/java.nio.file.Files.walk(Files.java:3958)
        at com.ibm.northstar.utils.ScopeUtils.createScope(ScopeUtils.java:76)
        at com.ibm.northstar.SystemDependencyGraph.construct(SystemDependencyGraph.java:208)
        at com.ibm.northstar.CodeAnalyzer.analyze(CodeAnalyzer.java:169)
        at com.ibm.northstar.CodeAnalyzer.run(CodeAnalyzer.java:94)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions