"Error 1722" trying to install JDK to non-default location
I have problem with installing开发者_运维问答 java JDK directly in C:. I was able to install in the "Program Files" folder. But for a development purposes, I need to install the JDK directly in the root of C.
Problem is when I try to install it it set up gives "Error 1722. There is a problem with this Windows etc." But the setup installed without any problem. It tried run as Administrator also.
Can any one give me a solution?
A hack which has worked for me in the past on Windows is to just copy the jdk directory from its location in Program Files to c:\jdk
Windows enabled applications will continue to use the version under Program Files and the tools which do not like spaces in the paths use the c:\jdk version. And this usually works well enough. (as long as the version do not grow to far apart)
Another alternative is becoming an expert in escaping and quoting filenames with spaces in a dozen configuration file types and scripting languages.
The JDK allows for a silent install with the "/s" option.
See http://www.digitalsanctum.com/2008/06/13/silent-install-of-jdk-and-jre/
But if your program is dependent on other software, a full scale installer might be a good idea.
(We use jsmooth to wrap a jar as an EXE which contains code to let the user install the needed Java version if not found, it also allows for enclosing the JRE in the EXE. Perhaps this works with JDK too)
精彩评论