Hi, does any body try to reload the FileZilla server form java? I try with
Process p = Runtime.getRuntime().exec(new String[]{"C:\\..\\FileZilla Server\\FileZilla server.exe","/reload-config"});
System.out.println(p.waitFor());
If a exectue the comand without the parameter (/reload-config), the .exe is executed, but when I try with the parameter it doesn't work. The p.waitFor() returns 1.
Any clue?
Thanks in advance!
Reload server from Java
Moderator: Project members
The '1' is for failure sadly there is no more information provided by Java than if 0 is returned then is a succesfull execution otherwise not.
I check if the execution was succesfull throught the FileZilla Server Interface that doesn'r reflect my changes.
I'm writing on the FileZilla Server.xml file and then I try to reload the server.
Thanks
I check if the execution was succesfull throught the FileZilla Server Interface that doesn'r reflect my changes.
I'm writing on the FileZilla Server.xml file and then I try to reload the server.
Thanks
I've finally made it work. The fact that Java returns 1 it doesn't mean that FileZilla server.exe /reload-config wasn't executed. In fact, it was.
The problem, I think is that in some occasions the reload doesn't reflect the changes in the XML config file. It could be maybe because I call the command several times very quickly.
When the change is not reflected, I wait until all my "Java work" finished and then I call from java the reload command one more time and works fine.
It could be maybe too, because some connections to the sever were opened at the time, and I modify the XML config file and reload the server several times.
Anyway, this scenarios are not very commons in my domain.
Thanks for all... excellent project.
The problem, I think is that in some occasions the reload doesn't reflect the changes in the XML config file. It could be maybe because I call the command several times very quickly.
When the change is not reflected, I wait until all my "Java work" finished and then I call from java the reload command one more time and works fine.
It could be maybe too, because some connections to the sever were opened at the time, and I modify the XML config file and reload the server several times.
Anyway, this scenarios are not very commons in my domain.
Thanks for all... excellent project.