How to start an application in background IDEA via plugin


I'm starting a Java application via plugin, if IDEA is running in background, the following lines:

DumbService dumbService = DumbService.getInstance(project);
dumbService.smartInvokeLater(() -> SofaUtils.startApplication(project, DefaultRunExecutor.getRunExecutorInstance()));

will not be executed after a long waiting, is there any solution to start an application running IntelliJ IDEA in background?

Comment actions Permalink


I find your question interesting.

Can you give more detail about running in the background.

You mean that IDEA is not the active application and you only need to select it to bring it to the front.

Or if it's on windows it's running on another desktop.

Or idea runs completely in the background using X forwarding

Comment actions Permalink

running in background means  idea is started in projector mode(or headerless?) on a linux server, I hope the application can be started by a plugin no matter the projector client is started or not

Comment actions Permalink

Please see and following sections on how to automatically invoke code on application/project open.


Please sign in to leave a comment.