I have an existing jar file which I run. It is the Selenium RC server. I want to be able to change the JVM httpProxy.host/port/etc system values. On the one hand I can modify the source and add this feature in. Would take some time. Is there another possible way to do this? Like have my own JAR (which would set these JVM properties) invoke selenium-rc inside that very same JVM instance (that way it would be able to modify its JVM variable’s values) ?
Share
You can define system properties on the command line, using
So you could write
See Java – the java application launcher,
EDIT:
You can write a wrapper that is an application launcher. It’s easily to emulate calling a
mainmethod in a class using reflection. You then can also set system properties viaSystem.setPropertybefore launching the final application. For example,