If you want some files to be part of the deployment package you can add them to the /resources folder. You can access that path in java via Core.getConfiguration().getResourcesPath()
For using openCV there are some packages with packaged native libraries, e.g.: https://github.com/openpnp/opencv
Not sure if these are still maintained, but this is generally a working approach.
regards Fabian
If you do not mind these files potentially being downloaded by users, you can drop them into the theme directory. because files there are copied to the web directory.
with these files present inside of the container, you can load them as you described above. But following this:
>
You can configure the Java properties by providing the JAVA_OPTS
enviroment variable to the application.
Configure the JAVA_OPTS
environment variable by using the cf set-env
command.
cf set-env <YOUR_APP> JAVA_OPTS '["-Djava.rmi.server.hostname=127.0.0.1", "-Dcom.sun.management.jmxremote.authenticate=false", "-Dcom.sun.management.jmxremote.ssl=false", "-Dcom.sun.management.jmxremote.port=5000", "-Dcom.sun.management.jmxremote.rmi.port=5000"]'
do note what you are doing is fragile and hacky. This means that this functionality might not even work (not tested) or can break in the future out of the blue. Because your approach depends on native libraries other than java libs.
a better solution would be to extract your functionality of opencv into a separate service. Then call this service via API from your mendix app.