我创建了一个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
看起来编译器正在寻找与我使用的方法相关的库,这很奇怪,因为我将它们添加到了项目中。这是该项目的照片:
photo
我觉得我确实缺少一些简单的东西,但我无法弄清楚。谢谢
最佳答案
“选择环境选项卡。单击新建按钮。使用名称PATH(在Windows上),LD_LIBRARY_PATH(在Windows上
Linux)或DYLD_LIBRARY_PATH(在Mac上),然后在“值”中输入以下文本:/ lib /
COMSOL Multiphysics的安装目录在哪里,以及
是win64 / glnxa64 / maci64之一,具体取决于您的平台。单击“应用”。