Skip to content

ClassFinder for full-fat start jar #38

@sknop

Description

@sknop

Hi,

I have tried the following code which seems to work perfectly:

    val path : String = CLI.getClass.getProtectionDomain.getCodeSource.getLocation.getPath
    println("Path found " + path)

    val finder = ClassFinder(List(path).map(new File(_)))

This detects the jar file I started from, gives me back the path which I then can pass into the class finder. Seems to work for both a classpath to my class files as well as an assembled jar with all dependencies included.

Maybe an idea for the readme, example or the actual code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions