Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Java Unsuccessful link Error
Posted Apr 5, 2024, 9:50 a.m. EDT API Version 6.2 0 Replies
Please login with a confirmed email address before reporting spam
The below post is related to an archived discussion
[start here] I am getting the same error as the person before when I tried to run COMSOL API in linux .
My error is:
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'void com.comsol.nativejni.util.FlLicense.initWS0(com.comsol.nativejni.CPointer, java.lang.String, java.lang.String)' at com.comsol.nativejni.util.FlLicense.initWS0(Native Method) at com.comsol.nativejni.util.FlLicense.<init>(SourceFile:71) at com.comsol.nativejni.util.FlLicense.getInstance(SourceFile:81) at com.comsol.nativeutil.e.d.<clinit>(SourceFile:22) at com.comsol.nativeutil.e.c.l(SourceFile:657) at com.comsol.model.util.ServerModelUtil.create(SourceFile:43) at com.comsol.model.util.ModelUtil.create(SourceFile:92) at RunComsolModel.run(RunComsolModel.java:10) at RunComsolModel.main(RunComsolModel.java:7)
My code is :
import com.comsol.model.*;
import com.comsol.model.util.*;
public class RunComsolModel {
public static void main(String[] args) {
run();
}
public static Model run() { Model model = ModelUtil.create("Model"); model.modelNode().create("comp1"); model.geom().create("geom1", 3); model.geom("geom1").feature().create("blk1", "Block"); model.geom("geom1").feature("blk1").set("size", new String[]{"0.1", "0.2", "0.5"}); model.geom("geom1").run("fin"); return model; } }
Is there a fix forwhat is going on? I have set the environment variables for LD_LIBRARY_PATH and LD_PRELOAD
Hello Nikhil Antony
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.