The simplest answer might be to edit your Tomcat installation's bin/startup
script to change the java.library.path
to wherever you're copying the native library to. Something like
java -Djava.library.path=/path/to/my/libs existing args
If you're using a shared hosting provider, you'll need to consult with the owner to determine if they'll allow native libraries to be loaded into the container, and if there's a specific location to which the libraries should be copied.
Beyond that, there's the meta problem of your development environment being different from your deployment environment. Ideally, you would have an exact copy (or as close as possible) of the deployment configuration running on your local development machine.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…