Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Problem compiling Java due to model.save command

Please login with a confirmed email address before reporting spam

I want to load my comsol models using java files. I have determined how to create a java file and compile it using comsolcompile. The problem I am having is that at the end of the compiled class file I would like to insert a command to save the model as an mph file. The Comsol API reference document states that I can use--- model.save("filename","m");--- or model.save("filename","java");-- to create an m file or a java file, both of which work fine for me. The problem comes when I try to put in a command to save the file as a mph file. When I try to use, model.save("filename");---as described in the API refrence document, there is an error when the java file tries to compile. I have also tried model.save("filename","mph");--which also make the compiler fail. I have tried this on Comsol 4.0, 4.0a, and 4.1 all of the compilers give me the same error. Can anyone help?




Daniel

1 Reply Last Post Jun 28, 2013, 11:52 a.m. EDT
COMSOL Moderator

Hello Daniel Foster

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.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 28, 2013, 11:52 a.m. EDT
Have you tried model.name("yourfilename.mph")?
Have you tried model.name("yourfilename.mph")?

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.