MPh-py / MPh

Pythonic scripting interface for Comsol Multiphysics
https://mph.readthedocs.io
MIT License
265 stars 67 forks source link

Change classpath to `apiplugins` fixing #114 #115

Closed maederan201 closed 1 year ago

maederan201 commented 1 year ago

This PR implements a change required to fix #114 (at least on my system). The classpath is changed from plugins to apiplugins.

All the tests in tools/test.py complete successfully after this. Needs to be verified that it works on other OS as well.

john-hen commented 1 year ago

Turns out, the tests fail on Windows with com.comsol.util.exceptions.FlException: Not connected to a server. So this doesn't solve all the problems. But I'll probably merge this anyway and "fix it in post" if my hunch is correct.

What I think this all means is:

I guess the eventual solution would be to load the Java libraries from either the plugins or the apiplugins folder, depending on which type of client we're instantiating.

maederan201 commented 1 year ago

I won't pretend I fully understood the reasons. However, I included different classpaths depending on whether its a standalone client or not. Again for me on Linux it works and all tests pass.

Idk if there is a more elegant solutions but it might work platform independent.

john-hen commented 1 year ago

Tested, merged, and released. Thank you for your contribution!

qup20 commented 9 months ago

I am sorry that my computer knowledge may be limited and I did not understand your conversation. I would like to use MPH on a Linux server. How can I set the path? Is there a complete reference document available? The description page for adding path links in the Docs document is no longer valid. I really hope to receive your help! @john-hen