Revision: 4655 http://sourceforge.net/p/vexi/code/4655 Author: mkpg2 Date: 2014-02-05 14:52:42 +0000 (Wed, 05 Feb 2014) Log Message: ----------- Feature. Launched process inherits properties from the launcher (hopfully including proxy settings).
Modified Paths: -------------- trunk/org.vexi-launcher/src/main/java/org/vexi/launcher/Launcher.java Modified: trunk/org.vexi-launcher/src/main/java/org/vexi/launcher/Launcher.java =================================================================== --- trunk/org.vexi-launcher/src/main/java/org/vexi/launcher/Launcher.java 2014-02-05 11:37:55 UTC (rev 4654) +++ trunk/org.vexi-launcher/src/main/java/org/vexi/launcher/Launcher.java 2014-02-05 14:52:42 UTC (rev 4655) @@ -312,6 +312,29 @@ throw new RuntimeException("Could not create log file: " + f.getCanonicalPath()); } + + static final String[] INHERITABLES = { + "ssl.TrustManagerFactory.algorithm", + "javax.net.ssl.trustStoreType", + "javax.net.ssl.trustStore", + "javax.net.ssl.trustStoreProvider", + "javax.net.ssl.trustStorePassword", + "java.home", + "ssl.KeyManagerFactory.algorithm", + "javax.net.ssl.keyStoreType", + "javax.net.ssl.keyStore", + "javax.net.ssl.keyStoreProvider", + "javax.net.ssl.keyStorePassword", + "http.proxyHost", + "http.proxyPort", + "http.nonProxyHosts", + "http.keepAlive", + "http.maxConnections" + }; + + + + public void go() throws Exception { try { log("Launcher Build : "+getVersion()); @@ -345,7 +368,20 @@ command.add(findJvmBinary()); if (context.getParameter("mem") != null) { command.add("-Xmx" + context.getParameter("mem")); + + for(String propKey: INHERITABLES){ + String propValue = System.getProperty(propKey); + if(propValue!=null){ + String propArg = "-D"+propKey+"="+propValue; + log("Inherit prop: "+propArg); + command.add(propArg); + } + } } + + + + command.add("-jar"); command.add(corefile.getPath()); @@ -400,6 +436,9 @@ private void spawn(Vector command) throws IOException { File dir = dotvexi.getBaseDir(); String[] command_vec = new String[command.size()]; + + + command.copyInto(command_vec); log("in directory : " + dir.getCanonicalPath()); log("executing : "); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn