Prevent server from closing upon disconnect in java API
Posted 2018年7月12日 GMT-0400上午11:34 Interfacing, API, COMSOL Server Version 5.3 2 Replies
Please login with a confirmed email address before reporting spam
I am building a program in java that runs a COMSOL model in server mode. This program is executed multiple times by another external program and java needs to terminate each time. As such, I need to connect to and disconnect from the COMSOL server repeatedly. My issue is that the server window closes when either of these two commands are executed in java: ModelUtil.disconnect(); System.exit(0);
I could potentially tell the external program to restart a COMSOL server instance before running the java program each time, but surely there is a way to ensure the server stays open once I have disconnected from it.
I'm sure I am missing something very simple, but can't find the answer in the manual. Thanks for any help!