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.
Error while compiling the java file
Posted 10.09.2022, 07:58 GMT-4 General, API, Model Manager Version 5.1 0 Replies
Please login with a confirmed email address before reporting spam
Hi, I am trying to open my simulation done on comsol v5.6 on comsol v5.1. I find that the only solution is to save my file as java file and compile it in the older version of comsol and open it as class file on comsol v5.1. However, while trying to compile the java file I got the below error: error: cannot find symbol model.component().create("comp1", true); ^ symbol: method component() location: variable model of type Model
Also, here is some of my java file (saved from comsol 5.6) import com.comsol.model.*; import com.comsol.model.util.*;
/** Model exported on Sep 10 2022, 13:44 by COMSOL 5.6.0.280. */ public class Simulation1 {
public static Model run() { Model model = ModelUtil.create("Model");
model.modelPath("C:\\Users\\Omar\\Desktop\\Comsol");
model.label("Simulation1.mph");
model.param().set("a_Wood", "0");
model.param().set("b_Wood", "10[mm]");
model.param().set("a_Insulation", "17[mm]");
model.param().set("b_Insulation", "78.5[mm]");
Any suggestion will be appreciated.
Thank you!
Hello Omar Osman
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.