Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
engine
engine
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Pulse Physiology Suite
  • engineengine
  • Issues
  • #22

Closed
Open
Created Mar 24, 2020 by marinier@marinierDeveloper

Native library loading in Java is a bit brittle

In FileUtils.loadLibrary(), it searches for the libName (i.e., PulseJNI) followed by "." or "d.". It then checks to see if exactly 1 file was found by either search. The problem is, this really restricts where the libraries can be. E.g., I was trying to have all the debug libs in a single directory with their pdb files, but the pdb files cause there to be 2 matches, so then it falls through to the default case, which tries to load the non-debug libs.

I assume the files are being looked for in this particular way to avoid dealing with platform-specific suffixes. Instead of this approach, you could do this: System.mapLibraryName(libName) and System.mapLibraryName(libName + "d").

Additionally, I wonder if it would be possible to allow a user to specify whether they want the release or debug libs. If this capability existed, then both versions could be in the same directory (currently, if both are present, it will load the release libs).

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None