我部署在服務器中使用Matlab的的MCR一些圖像處理功能的Java EE項目。幾個月來我一直在嘗試這個方法,我無法完成它。問題是當它要使用MCR時,它無法找到.so庫。我得到這個錯誤:如何設置Matlab的MCR爲Ubuntu和Netbeans(UnsatisfiedLinkedError)
javax.servlet.ServletException: Failed to find the library libmwmclmcrrt.so.7.13, required by MATLAB builder JA, on java.library.path. This library is typically installed along with MATLAB or the MCR, its absence may indicate an issue with that installation or r the current path configuration. The MCR version that this component is trying to use is 7.13.
ROOT CAUSE:
java.lang.UnsatisfiedLinkError: Failed to find the library libmwmclmcrrt.so.7.13, required by MATLAB Builder JA, on java.library.path. This library is typically installed along with MATLAB or the MCR, its absence may indicate an issue with that installation or the current path configuration. The MCR version that this component is trying to use is: 7.13.
的服務器使用:
- Ubutuntu 64位。
- 的Netbeans 7.4
- Glassfish的
- 的Java 6 SDK
- 首先它採用MCR 7.13現在它使用MCR 8.1
事情我已經嘗試:
- 設置環境變量LD_LIBRARY_PATH和XAPPLERSDIR與出口:
export LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/bin/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/sys/java/jre/glnxa64/jre/lib/amd64/native_threads:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/sys/java/jre/glnxa64/jre/lib/amd64/server:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/sys/java/jre/glnxa64/jre/lib/amd64:$LD_LIBRARY_PATH
export XAPPLRESDIR=/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/X11/app-defaults
- 設置環境變量LD_LIBRARY_PATH和XAPPLERSDIR與SETENV:
Command setenv not found
- 編輯ld.so.conf中文件並運行ldconfig
- 加入-Djava.library.path =我的/路徑/到/所以在GlassFish中
- 加入-Djava.library.path =我的/路徑/到/所以在Netbeans的喜歡在這裏說: giving 'java.library.path' in netbeans for .dll/.so files
- 我試圖設置環境變量的Netbeans在這篇文章喜歡說:How to set Environment Variable in Netbeans? 但我不能找到「操作」
- 我試圖設置環境變量的Netbeans在這篇文章喜歡說:https://askubuntu.com/questions/267071/ld-library-path-specification 但我找不到「環境」
我已經嘗試了很多更多的東西,我不記得,他們都沒有工作,它一直顯示相同的錯誤(現在版本8.1而不是7.13)。請我感謝任何幫助。
謝謝!這對我有用! – 2014-09-06 16:55:48