Java Unsuccessful link Error

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


Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.