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.
Comsol Java API
Posted Dec 6, 2017, 3:35 a.m. EST Interfacing, General, API, Modeling Tools & Definitions Version 5.2 8 Replies
Please login with a confirmed email address before reporting spam
Hi,
Anybody knows if comsol Javs API models (like BeamModel.java) are runnable by NetBeans/Ecilipse in Linux(ubunto)? I tried and i got some errors. I still couldnt figure it out how to fix it. Any help will be greatly appreciated. Thanks in advance.
Regards, Mohammad
Please login with a confirmed email address before reporting spam
I believe they are executable using eclipse/ubuntu. What errors did you get? And did you import the .jars and add the necessary lines of code?
-------------------Nick
Please login with a confirmed email address before reporting spam
yes, I import the .jars. The Java Application Project is compiled in windows 10 and works fine but when i run it in Linux (Ubunto) it doesn't run. I tried to figure it out how i can fix it. The last error i got is as follows:
run: /home/m/.cache/netbeans/8.1/executor-snippets/run.xml:53: Java returned: 1 BUILD FAILED (total time: 1 second)
Any helps greatly appriciated.
Regards, Mohammad
Please login with a confirmed email address before reporting spam
I'm sorry, it was a long time ago that I used a Java IDE on Linux to run a Comsol model. Other people have had similar issues if you check the forums; it would also be worthwhile to ask support about the problem. Good luck.
-------------------Nick
Please login with a confirmed email address before reporting spam
hey Nick,
I still havent found any solutions for this issue. can you give me some details of how you could run a comsol model by netbeans/eclipse in linux?
Please login with a confirmed email address before reporting spam
Hi,
Here is my java application project attached to this message. It works fine in windows 10 but not in Linux. Link of the jar files are as follows:
https://www.dropbox.com/s/be5oit0gpvipijy/miglayout-4.0-swing.jar?dl=0
https://www.dropbox.com/s/rnpip8fmdghi4w6/plugins.rar?dl=0
You just need to import the above jar files and it runs in windows 10. Can you check it in Linux to see if it works for you?
Attachments:
Please login with a confirmed email address before reporting spam
Hello All,
Regarding the Java API: If anyone is currently using the Java API, we do encourage you to take a thorough look at using Model Methods instead.
Model Methods, as well as Application Methods, have (we believe) almost completely obviated the need for using the API and compiling. Model Methods can be written on the Windows platform, and can be run on any supported platform.
For a quick introduction, see: https://www.comsol.com/blogs/how-to-use-model-methods-to-accelerate-your-comsol-workflow/ https://www.comsol.com/blogs/how-to-create-a-randomized-geometry-using-model-methods/ as well as the Application Programming Guide document.
Best Regards,
Please login with a confirmed email address before reporting spam
Hey guys,
I apologize for not being able to provide more information on running models through Eclipse on Linux - although this process is outlined in the COMSOL Java API reference guide. Are you able to execute code with your current Eclipse/Linux setup?
Also, like Walter pointed out, model/application methods are really nice for implementing your own pieces of code into your simulations. For instance, I sometimes use a model method to produce a different random number each time I run a simulation - a feature which doesn't seem to be available otherwise, at least in the particular physics interfaces that I'm using now.
-------------------Nick
Please login with a confirmed email address before reporting spam
Hi,
I'm not able to execute the code with Eclipse/Linux but it works fine in windows 10. Do you have any version of Linux (Debian or Ubunto) installed in your pc or laptop? If yes, would you please check if it works in your Eclipse/ Linux?
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.
Suggested Content
- KNOWLEDGE BASE LDAP configuration for a Model Manager server using Apache Directory Studio
- KNOWLEDGE BASE Out of Memory
- BLOG Automate Your Modeling Tasks with the COMSOL API for use with Java®
- BLOG Автоматизация численного моделирования с использованием COMSOL API и Java®
- FORUM Using Comsol Java API to Evaluate Expression at Arbitrary Point