classutil icon indicating copy to clipboard operation
classutil copied to clipboard

ClassFinder for full-fat start jar

Open sknop opened this issue 5 years ago • 0 comments

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?

sknop avatar Oct 27 '20 16:10 sknop