gpt4 book ai didi

java - 在 CMD 中设置 JavaSci

转载 作者:行者123 更新时间:2023-12-01 12:35:55 24 4
gpt4 key购买 nike

愿你平安,

基于此link ,我按照在 Windows 中设置 JavaSci 所需的步骤进行操作;但我遇到了这个问题

c:\Backups>javac -cp "C:\Program Files\scilab-5.5.0\modules\javasci\jar\org.scilab.modules.javasci.jar;C:\Program Files\scilab-5.5.0\modules\types\jar\org.scilab.modules.types.jar";. TestSciLab.java

c:\Backups>set PATH=%PATH%;"C:\Program Files\scilab-5.5.0\bin"

c:\Backups>java -cp "C:\Program Files\scilab-5.5.0\modules\javasci\jar\org.scilab.modules.javasci.jar;C:\Program Files\scilab-5.5.0\modules\types\jar\org.scilab.modules.types.jar";. TestSciLab
The native library javasci does not exist or cannot be found.
java.lang.UnsatisfiedLinkError: no javasci in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at org.scilab.modules.javasci.Call_ScilabJNI.<clinit>(Unknown Source)
at org.scilab.modules.javasci.Call_Scilab.SetFromJavaToON(Unknown Source)
at org.scilab.modules.javasci.Scilab.initScilab(Unknown Source)
at org.scilab.modules.javasci.Scilab.<init>(Unknown Source)
at org.scilab.modules.javasci.Scilab.<init>(Unknown Source)
at TestSciLab.main(TestSciLab.java:7)
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.scilab.modules.javasci.Call_ScilabJNI.SetFromJavaToON()V
at org.scilab.modules.javasci.Call_ScilabJNI.SetFromJavaToON(Native Method)
at org.scilab.modules.javasci.Call_Scilab.SetFromJavaToON(Unknown Source)
at org.scilab.modules.javasci.Scilab.initScilab(Unknown Source)
at org.scilab.modules.javasci.Scilab.<init>(Unknown Source)
at org.scilab.modules.javasci.Scilab.<init>(Unknown Source)
at TestSciLab.main(TestSciLab.java:7)

c:\Backups>

您在上面的屏幕和link中的指南中看到的唯一区别是我把%path%移到开头的地方。但不要怀疑!即使我用相反的顺序检查了它,我也得到了错误。

我的代码很简单

import org.scilab.modules.javasci.JavasciException.InitializationException;
import org.scilab.modules.javasci.Scilab;

public class TestSciLab {
public static void main(String[] args) throws InitializationException {
Scilab sci = new Scilab();
}
}

有什么亮点吗?

最佳答案

在 Windows 上,您只需将 Scilab 的 bin 文件夹添加到 %PATH% 即可。

关于java - 在 CMD 中设置 JavaSci,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25594403/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com