Question:
Is there a better way than killing Java in Solution 2 (see
below)?
Problem 1:
I wanted an easy way to run Forrest (as a server) from
within Eclipse using one (of several projects) that I'm
currently working on.
Solution 1:
In Eclipse create an new External Tool "Run Forrest" with
these settings:
Location: [YourForrestProgramDir]\bin\forrest.bat
Working Directory: ${project_loc}
Arguments: run
This will start the Jetty-Server in the project directory
of the project you are currently working on. Because we
use the project directory variable ${project_loc} you
don't have to select the project root, selecting any file
or folder below it in the Navigator is good enough.
Advantage:
Quick way to run the server on any project without having to
switch to a command line window or create individual
batch files that do it for you.
Much nicer logging of the output right with your project.
Problem 2:
Using this I ran into a problem stopping the jetty-server:
Since Eclipse would not let be use the normal Ctrl-C to
stop the server, the only way I found was to terminate the
process from Eclipse.
Unfortunately that did not remove the process completely
and so when I tried to re-start it (in another project),
I found the Jetty still running for the first project and
no way to stop it.
Solution 2:
Create a second External Tool KillJava with these setting:
Location: C:\WINDOWS\system32\taskkill.exe
Working Directory: -
Arguments : /F /IM java.exe
Works for me and didn't seem to have any side effects.
But I know this is not the nice way to do it.
Any suggestions?
--
Ferdinand Soethe