2010/2/17 Chris Hostetter <hossman_luc...@fucit.org>: > : There is something really interesting going on when I try to start > : Solr and then connect to it in the same process. I get a "connection > : refused" error. The code I try to use is found below. If I start solr > : with runtime.exec("java -jar start.jar") it works fine to connect to > : it afterwards, but if I start solr with runtime.exec("java > : -Dcom.sun.management.jmxremote -jar start.jar") I can't connect to > > have you considered the possibility that when you start with JMX enabled > it just happens to take longer then 5 seconds for the port to start up?
It seems that you are correct. How embarrasing. > FWIW: using Runtime.exec in java to launch another java program seems > extremely crackpot. This is just for testing solr and restarting it between requests. Thanks for the tip. /Tim