2

I created a Java project to automate simulations in COMSOL Multiphysics. However, whenever I try to run the code, I'm hit with the following error.

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

It looks like the compiler is looking for the libraries associated with the methods I'm using, which is weird because I added them to the project. Here's a photo of the project:

photo

I feel like there's something really simple that I'm missing but I can't figure it out. Thanks

Marco Wolf
  • 21
  • 1

1 Answers1

0

"Select the Environment tab. Click the New button. Use the Name PATH (on Windows), LD_LIBRARY_PATH (on Linux), or DYLD_LIBRARY_PATH (on Mac) and enter the following text in Value: /lib/ where is the directory where COMSOL Multiphysics is installed and is one of win64/glnxa64/maci64 depending on your platform. Click Apply."

Anshul Sharma
  • 3,432
  • 1
  • 12
  • 17
  • Not sure what you mean by the environment tab. In the Libraries tab of the Java Build Path window I added a new variable named PATH with the address you suggested. However, I still don't have any luck. – Marco Wolf Jun 26 '17 at 18:30
  • @Mayank Sharma can you take me correct example. I try to write: D:\Program Files\COMSOL\COMSOL52\Multiphysics\lib\win64 D:\Program Files\COMSOL/win64 and many others are ended `A fatal error has been detected by the Java Runtime Environment` – Andrew Kachalin Jun 29 '17 at 08:50