views:

155

answers:

1

I am developing a Flex-based game, and struggling with SmartFox Server.

Anyway, it's a java-based server for Flash platform games, and it's kind of clunky to develop with on Windows. So, I want to be able to start it (and stop it) via Eclipse rather than the current batch file nastiness they provide.

The problem is I've never done that with a non-standard server that didn't just have a server adaptor in Eclipse.

I know it should be pretty simple, but how do I do it? It's really just a matter of calling a command line executable with some arguments, or even just running it as a Java application without its executable shell. Killing it would just be a matter of killing the process in Eclipse.

Also of note is that I want to make sure I have the shell output in Eclipse for debugging purposes.

+1  A: 

I would think you could run it as an "External Tool" from Eclipse (the little green arrow with the toolbox). Click on the menu arrow to the right of that icon and select the "Configure External Tools" option.

You can then right click on the "Program" tree-node (on the Left hand side) and select "New" to create a new configuration. You will need to fill in the values similar to what you would do if you were running the server on the command line.

Give your configuration a meaningful name, like "SmartFox" or something.

Location is the command that is run (might point to java in your case).

To get the console setup, click on the "Common" tab and the "Allocate Console" checkbox should already be checked.

Once you are done, press the "Apply" or "Run" button.

You can then start the server by selecting it from the "External Tools" list (same icon as earlier) and you can stop it using the red stop icon on the console (should work).

Optional... the other tabs of the configuration dialog may be useful. You might want to have the build tab not do a build before launch, depending on how you have things set up.

What this wont give you (necessarily) is the tight integration between the server and Eclipse. You may have to do additional configuration or just deploy your code to the server as necessary.

Hopefully I am not way off base of what you were looking for.

Good luck.

cjstehno
Thanks that was helpful. :)
Jason Maskell