Skip to content

JarFile does not support urls of the form "jar:file:///my.jar!/path" #5287

@tsachev

Description

@tsachev

following works and have test for it

File file = new File("...");
new URL("jar:" + file.toUri() + "!/2.dat").openStream();

However if the url string is created like this

File file = new File("...");
new URL("jar:" + file.toPath().toUri() + "!/2.dat").openStream();

it breaks because now on *nix the file uri is of the form file:///path/to/my.war instead of file:/path/to/my.war

Jetty 9.3 actually now uses Path instead of File internally and thus the resources from a war cannot be loaded.

working on PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions