Skip to content

CommandLine Immediately Return Result #1810

Answered by remkop
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry for the late reply, I missed this.

One idea is to simply not return from the run method after starting the server.

 public void run() {
    Server server = new Server();
    server.start();
    while (server.isRunning()) {
        Thread.sleep(1);
    }
}

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
2 replies
@remkop
Comment options

@ghost
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant