2

我创建了一个 Java 项目来自动化 COMSOL Multiphysics 中的仿真。但是,每当我尝试运行代码时,都会遇到以下错误。

java.lang.UnsatisfiedLinkError: com.comsol.nativejni.server.FlRunnable.createRunInfo(Lcom/comsol/nativejni/CPointer;)V
at com.comsol.nativejni.server.FlRunnable.createRunInfo(Native Method)
at com.comsol.nativejni.server.FlRunnable.<init>(Unknown Source)
at com.comsol.nativeutil.runnable.f.<init>(Unknown Source)
at com.comsol.model.method.GeomSequenceMethod$1.<init>(Unknown Source)
at com.comsol.model.method.GeomSequenceMethod.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.comsol.model.internal.impl.PrimitiveModelEntityImpl.a(Unknown Source)
at com.comsol.model.internal.impl.PrimitiveModelEntityImpl.bm(Unknown Source)
at com.comsol.model.internal.impl.GeomSequenceImpl.method(Unknown Source)
at com.comsol.model.internal.impl.GeomSequenceImpl.method(Unknown Source)
at com.comsol.model.internal.impl.ModelEntityImpl.c_(Unknown Source)
at com.comsol.model.internal.impl.ModelEntityImpl.tag(Unknown Source)
at com.comsol.model.internal.impl.GeomListImpl.doCreate(Unknown Source)
at com.comsol.model.internal.impl.GeomListImpl.a(Unknown Source)
at com.comsol.model.internal.impl.GeomListImpl$1.a(Unknown Source)
at com.comsol.model.internal.impl.GeomListImpl$1.execute(Unknown Source)
at com.comsol.model.clientserver.ClientManager$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Failed to find methods for: com.comsol.model.internal.impl.GeomSequenceImpl

看起来编译器正在寻找与我正在使用的方法关联的库,这很奇怪,因为我将它们添加到项目中。这是该项目的照片:

照片

我觉得我错过了一些非常简单的东西,但我无法弄清楚。谢谢

4

1 回答 1

0

“选择环境选项卡。单击新建按钮。使用名称 PATH(在 Windows 上)、LD_LIBRARY_PATH(在 Linux 上)或 DYLD_LIBRARY_PATH(在 Mac 上)并在值中输入以下文本:/lib/ 其中是 COMSOL Multiphysics 所在的目录已安装并且是 win64/glnxa64/maci64 之一,具体取决于您的平台。单击应用。

于 2017-06-26T17:36:09.103 回答