Jonathan Beaudoin
Jonathan Beaudoin

Reputation: 2188

Restarting a Java Program Within Eclipse

I own a game server and I was just wondering, instead of running the server in eclipse and then when I restart it, it opens a new cmd prompt outside of eclipse and runs the server on that. Could I make it so the program relaunches in eclipse as if I hit the green play button?

Upvotes: 0

Views: 206

Answers (1)

SpiffyDeveloper
SpiffyDeveloper

Reputation: 127

I was reading your comments on this post. You said that you don't want to kill the program and then restart from within eclipse. So you have two options.

  1. Bad Answer: Just press ctrl + F11 (relaunch the application and ignore the old one)
  2. Good Answer: Press F11 then go to what looks like a computer in the console tab. You can select the previous running program and kill it and the second one will still be running.

If what you want to do is transfer the data and keep it the same run time state, well to say the least that is going to be some what complex. I would make some kind of method to transfer all current data and call it from your constructor. Then start your second program and kill the original. I'm 90% sure all your users will get booted though.

Upvotes: 1

Related Questions