I have done my .java file that changes registry data. But I am getting \"illegal escape character\" error on the line where Runtime.getRuntime().exec exists. Wh
Back slashes in Java are special "escape" characters, they provide the ability to include things like tabs \t and/or new lines \n and lots of other fun stuff.
Needless to say, you to to "escape" them as well by adding an addition \ character...
'HKCU\\Software\\Microsoft\\Internet Explorer\\Main'
On a side note. I would use ProcessBuilder or at the very least, the version of Runtime#exec that uses array arguments.
It will save a lot of hassle when it comes to dealing with spaces within command parameters, IMHO