开发者

How to make forward slashes be respected by java keytool in Cygwin environment?

I'm running the Java keytool program with -v $HOME/.keystore, which works fine in Unix (creates $HOME/.keystore), but in Cygin gets confused - says it is storing

/home/myaccount/.keystore

but fails with FileNotFoundException trying to write

\home\myaccount.keystore

How can I force keytool to use forward slashes? 开发者_开发问答

----> Follow up: thanks to @mikerobi below who answered my question. A little code frag for bash to use this in would be:

keystore="$HOME/.keystore"
if [ `uname -o` == 'Cygwin' ]
then
    keystorefile=`cygpath -wp $keystore`
fi


Use the cygpath utility, which can convert any cygwin path to a windows path.

keytool -v `cygpath -w "$HOME/.keystore"`
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜