java - 在 Windows 上手动安装 Java?

标签 java windows installation

我见过很多与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:
    1. change directory to directory C:\JDK.rsrc\JAVA_CAB10
    2. execute command: extrac32 111
  • Unpack C:\JDK.rsrc\JAVA_CAB10\tools.zip with 7-zip
  • In command shell (cmd.exe) do the following:
    1. change directory to C:\JDK.rsrc\JAVA_CAB10\tools\
    2. 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/

相关文章:

windows - 在系统启动时依次启动 cmd-scripts

windows - 批处理文件: List all folders in current directory with number/counter

java - 如何安装maven构建项目?

.net - 如何将 .NET Framework 4.0 Client Profile 附加到我的安装项目?

java - JDBC MS SQL Server Kerberos 身份验证

javascript - 如何从本地主机将我的 Node 服务器部署到互联网

virtualbox 和 linux/windows 上的 android-x86

java - 制作 Java GWT Web 项目安装程序?

java - java swing中模态窗口之上的模态窗口?

java - 使用 java8 Streams 在列表中合并内部列表