将库添加到 java.library.path
我正在尝试运行一个通过运行以下批处理文件来执行的程序:
@回声关闭
rem 在此处添加额外的 JVM 选项
设置选项=-Xms64m -Xmx256m
rem 构建命令行参数
设置 CMD_LINE_ARGS=%1
如果“%1”==“””转到doneStart
转移
:设置参数
如果“%1”==“””转到doneStart
设置 CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
转移
转到设置参数
:完成开始
rem 启动 DCS
java %OPTS% -Djava.ext.dirs=lib -Ddcs.war=war/carrot2-dcs.war org.carrot2.dcs.DcsApp
%CMD_LINE_ARGS%
此批处理文件将程序设置为 http://localhost:8080 (我相信这是一个servlet)。该程序是一个类似于此处的集群引擎: http://search.carrot2.org/stable/search 。一切似乎都正常,但我通过执行批处理文件得到以下命令提示符输出。
[信息]启动 DCS...
[INFO] 本机 LAPACK 不可用:java.library.path 中没有 nni_lapack
[INFO] 本机 BLAS 不可用:java.library.path 中没有 nni_blas
[INFO] DCS 在端口:8080 上启动
I设法在线找到 LAPACK 和 BLAS 库,但是如何将它们添加到 java.library.path (以及如何找到 java.library.path 指向的内容) 到)?
如果任何想帮助我的人需要一些额外的信息或澄清,请告诉我。我对 java web 开发还很陌生。
I am trying to run a program which is executed by running the following batch file:
@echo off
rem Add extra JVM options here
set OPTS=-Xms64m -Xmx256m
rem Build command line arguments
set CMD_LINE_ARGS=%1
if ""%1""=="""" goto doneStart
shift
:setupArgs
if ""%1""=="""" goto doneStart
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setupArgs
:doneStart
rem Launch the DCS
java %OPTS% -Djava.ext.dirs=lib -Ddcs.war=war/carrot2-dcs.war org.carrot2.dcs.DcsApp
%CMD_LINE_ARGS%
This batch file sets up the program at http://localhost:8080 (I believe it's a servlet). The program is a cluster engine similar to the one here: http://search.carrot2.org/stable/search. Everything seems to work, but I get the following command prompt output from executing the batch file.
[INFO] Starting DCS...
[INFO] Native LAPACK not available: no nni_lapack in java.library.path
[INFO] Native BLAS not available: no nni_blas in java.library.path
[INFO] DCS started on port: 8080
I managed to find the LAPACK and BLAS libraries online, but how do I add them to java.library.path (and how do I find what java.library.path points to)?
If anyone who'd like to help me needs some additional information or clarification, please let me know. I'm pretty new to java web development.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Java 使用
java.library.path
查找本机库(Windows 上的 dll)。您需要在某处下载 LAPACK 和 BLAS 库(例如在 C:\path\lapack\lib 和 C:\path\blas\lib 中)。然后,您需要在调用程序时适当地设置java.library.path
。例如:java.library.path
is used by Java to find native libraries (dlls on Windows). You need to download LAPACK and BLAS libraries somewhere (e.g. inC:\path\lapack\lib
andC:\path\blas\lib
). You then need to setjava.library.path
appropriately when you call your program. For example:您可以尝试:
You can try: