我见过很多与JDK捆绑的产品,我想知道是否有一种方法可以通过简单地将内容解压缩到目录来安装JDK,因此在添加/删除程序中没有创建图标,没有注册表项等。
同样在这种情况下: 我们如何为浏览器配置 Java 插件? 我们如何配置通过 Java 控制面板条目看到的设置?
最佳答案
根据this , 我创建了一个 batch script自动构建 jdk 文件。
链接的主要部分是:
- Create working JDK directory ("C:\JDK" in this case)
- Download latest version of JDK from oracle (for example "jdk-7u7-windows-i586.exe")
- Download and install 7-zip (or download 7-zip portable version if you are not administrator)
- With 7-zip extract all the files from "jdk-[6-7]u?-windows-i586.exe" in directory "C:\JDK"
- In command shell (cmd.exe) do the following:
- change directory to directory C:\JDK.rsrc\JAVA_CAB10
- execute command: extrac32 111
- Unpack C:\JDK.rsrc\JAVA_CAB10\tools.zip with 7-zip
- In command shell (cmd.exe) do the following:
- change directory to C:\JDK.rsrc\JAVA_CAB10\tools\
- execute command: for /r %x in (*.pack) do .\bin\unpack200 -r "%x" "%~dx%~px%~nx.jar" (this will convert all pack files into jar)
- Copy whole directory and all subdir of c:\JDK.rsrc\JAVA_CAB10\tools" where you want your JDK to be and setup manually JAVA_HOME and PATH to point to your JDK dir and its BIN subdir.
关于java - 在 Windows 上手动安装 Java?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/930265/