relinc / SurePulseDataProcessor

Part of the Sure-Pulse software package. This software processes material property data like stress and strain.
GNU General Public License v3.0
2 stars 1 forks source link

Loading libraries in both build and developement #55

Open bhalonen opened 6 years ago

bhalonen commented 6 years ago
static {
       // System.load("C:\\Program Files\\SUREPulse\\app\\libs\\kftKasierFilter.dll");    // loads kftKasierFilter.dll
        System.loadLibrary("kftKasierFilter");
    }

Right now I comment out one or the other line, use the bottom line for development, use the top line for deployment. Unbelievably hacky, but not sure what else can be done.

markhalonen commented 6 years ago

Perhaps you've tried this, but did you add the kftKasierFilter.dll to the install folder in the ant build?

You can also debug the installed app by running the jar file with java -jar SUREPulse.jar from the application. At least you can do this on Mac. Right click on the app, then "Show Package Contents": image

markhalonen commented 6 years ago

Windows: image

bhalonen commented 6 years ago

I managed to include it in the installer, but I don't know how to force an installed version to find the library. I've messed with pretty much every java.library.path setting in every place I could find.

markhalonen commented 6 years ago

Did you print the path?

bhalonen commented 6 years ago

I was setting it the line above attempting to load it.

markhalonen commented 6 years ago

Ok, I'll take a shot at it tomorrow. Worth the extra effort, this would just be forgotten on at least 50% of future builds unless we automate it in some way.

markhalonen commented 6 years ago

I'm trying to take a look at this. I have improve_filtering checked out on SPLibraries and filtering_libs_add checked out on SurePulseDataProcessor. I'm getting a bad xml format .classpath error for SurePulseDataProcessor. Do I have the right branches checked out to look into this?