P
petr cezar
hello,
i'm trying to run 'keytool' program from within my application by this way:
String cmdline = "keytool -genkey" +
" -dname \"cn=" + "MyName" + ", ou=" + "Development" + ", o=" + "IBM" + ", c="+ "CZ" + "\"" +
" -keyalg " + "DSA" +
" -keysize " + 1024 +
" -alias " + "MujFirstKey" +
" -keypass " + "somepasswd" +
" -keystore " + "/home/petr/MyKeystore" +
" -storepass " + "somepasswd" +
" -validity " + 180;
try {
Process p = Runtime.getRuntime().exec(cmdline);
.......
but 'keytool' always prints out only some help messages and that's all.
it seems like some of the command parameters are not in correct form, mabye
spaces or those in quotes, but i don't know...
does anybody know what's wrong with that code?
thank you very much,
and, please, excuse my pure english
-petr
i'm trying to run 'keytool' program from within my application by this way:
String cmdline = "keytool -genkey" +
" -dname \"cn=" + "MyName" + ", ou=" + "Development" + ", o=" + "IBM" + ", c="+ "CZ" + "\"" +
" -keyalg " + "DSA" +
" -keysize " + 1024 +
" -alias " + "MujFirstKey" +
" -keypass " + "somepasswd" +
" -keystore " + "/home/petr/MyKeystore" +
" -storepass " + "somepasswd" +
" -validity " + 180;
try {
Process p = Runtime.getRuntime().exec(cmdline);
.......
but 'keytool' always prints out only some help messages and that's all.
it seems like some of the command parameters are not in correct form, mabye
spaces or those in quotes, but i don't know...
does anybody know what's wrong with that code?
thank you very much,
and, please, excuse my pure english
-petr