how do I have to modify the following ruby script to make it work? (I’m on Linux.)
# 1. Launch a java server:
system "java -jar myJavaServer.jar -someArgument -otherArgument"
# 2. Execute some ruby code (with the server running):
[...]
# 3. Stop the java server:
system "killall java"
I suppose the java server must be launched into a separate ruby thread so the following code gets executed with the server running…?
Thanks a lot for your help!
Tom
Use fork() to run the java server in one process and your ruby code in the other.