Skip to content

JBang failures on Windows when symlinks are allowed in the FileSystem #895

@oleg-nenashev

Description

@oleg-nenashev

There are some issues in the implementation, which does not take this mode in account. This is not a default, but it is a legitimate use-case for Windows 10.

Runtime

C:\Users\Oleg\Documents\jbang>jbang gavsearch@jbangdev
[jbang] Downloading JDK 11. Be patient, this can take several minutes...
[jbang] Installing JDK 11...
[jbang] java.nio.file.FileSystemException: C:\Users\Oleg\.jbang\currentjdk: A required privilege is not held by the client.

[jbang] Creation of symbolic link failed.
[jbang] Now try creating a hard link instead of symbolic.
[jbang] Creation of hard link failed. Script must be on the same drive as $JBANG_CACHE_DIR (typically under $HOME) for hardlink creation to work. Or call the command with admin rights.
[jbang] [ERROR] Required Java version not possible to download or install. You can run with '--java 8' to force using the default installed Java.
[jbang] [ERROR] Unable to download or install JDK version 11
[jbang] Run with --verbose for more details

Buildtime

> Task :test

TestEdit > testEditJitPackDepAndRepo(Path) FAILED
    dev.jbang.cli.ExitException at TestEdit.java:121
        Caused by: org.jboss.shrinkwrap.resolver.api.NoResolvedResultException at TestEdit.java:121
            Caused by: org.eclipse.aether.resolution.DependencyResolutionException at TestEdit.java:121
                Caused by: org.eclipse.aether.resolution.ArtifactResolutionException at TestEdit.java:121
                    Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException at TestEdit.java:121
java -classpath ^"C:\Users\Oleg\Documents\jbang\jbang\build\classes\java\test\itests\hellojar.jar^" helloworld
java -Dfoo=bar ^"-Dbar=aap^ noot^ mies^" -classpath ^"C:\Users\Oleg\AppData\Local\Temp\junit2046284907444777935\jbang\cache\jars\helloworld.java.6c29e59df0efda6a7a9783b1de6b823dc0371000e3c8d32b2b143a430c20900b.jar^" ^"-XX:ArchiveClassesAtExit=C:\Users\Oleg\AppData\Local\Temp\junit2046284907444777935\jbang\cache\jars\helloworld.java.6c29e59df0efda6a7a9783b1de6b823dc0371000e3c8d32b2b143a430c20900b.jar.jsa^" helloworld
<========-----> 64% EXECUTING [5m 2s]

TestSourcesMultipleSomeMissingFiles > testFindSourcesInMultipleFilesSymbolicLinkMissing() FAILED
    java.nio.file.FileSystemException at TestSourcesMultipleSomeMissingFiles.java:91

280 tests completed, 2 failed, 2 skipped

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