Discussion Locked This discussion was locked by a forum moderator.
Prevent server from closing upon disconnect in java API
Posted Jul 12, 2018, 11:34 a.m. EDT Interfacing, API, COMSOL Server Version 5.3 1 Reply
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!