java - how to configure eclipse run configurations for System Properties (ssl/tls) in command line arguments -


my command line input when run without ide, java -

djavax.net.ssl.truststore="d:/xxxls/xxxx.jks"  -djavax.net.ssl.truststorepassword=posclient  pdevice.clientmain 1 d:/xxxls/xxssslxxxclient.jks  possslandencryptclient possslclient posencryptclient localhost 7866 sslyes encyes 

when try run application in eclipse, not works. how specify ssl/tls key path in eclipse. have key files in disk.(xxxx.jks, xxssslxxxclient.jks)

i don't know how configure eclipse specific command line arguments. file name (to excecuted) device.clientmain

please me.

yes, got solution place tls/ssl keys in eclipse run -> run configurations -> under main select class going run, -> (x)arguments provide key details include under vm arguments,under program arguments pass usual command line arguments. when running ssl layer client/server applications key list or key details should included under vm arguments. program works well.

in details, arguments divided program arguments, vm arguments in eclipse, program arguments arguments passed application, accessible via "args" string array parameter of main method. vm arguments arguments such system properties passed java s w interpreter.

the vm arguments go after call java interpreter (ie, 'java') , before java class. program arguments go after java class.

 public class argstest {  public static void main(string[] args) throws ioexception {      system.out.println("program arguments:");     (string arg : args) {         system.out.println("\t" + arg);     }      system.out.println("system properties vm arguments");     string sysprop1 = "sysprop1";     system.out.println("\tname:" + sysprop1 + ", value:" + system.getproperty(sysprop1));     string sysprop2 = "sysprop2";     system.out.println("\tname:" + sysprop2 + ", value:" + system.getproperty(sysprop2));  } 

} pass input as, java argstest -dsysprop1=sp1 -dsysprop2=sp2 pro1 pro2 pro3

output be:  program arguments: pro1 pro2 pro3  system properties vm arguments name:sysprop1, value:sp1 name:sysprop2, value:sp2 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -