Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Load Swift Libraries manually instead of System.loadLibrary #510

@TheTripleV

Description

@TheTripleV

I'm trying to use swift-java to include swift code in a java image processing application.
PhotonVision/photonvision#2158

I'm using FFM mode.
I've got it building when using ./gradlew run but it fails when packaging into a jar.

The generated java code uses System.loadLibrary but this doesn't work from a jar because

  1. /usr/bin/swift is not on the java path
  2. SwiftJava and SwiftRuntimeFunctions are still inside the jar

I think a solution would be to extract the libs in the initializer and use System.load.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions