简体   繁体   English

在第二个驱动器上安装 JDK

[英]Installing JDK on a second drive

I am in a situation where I need to install jdk8 on Windows. The C Drive is full and due to circumstances beyond my control I need to install JDK on the E drive.我处于需要在 Windows 上安装 jdk8 的情况。C 驱动器已满,由于我无法控制的情况,我需要在 E 驱动器上安装 JDK。 However when I run the JDK installer nothing appears to happen.但是,当我运行 JDK 安装程序时,似乎什么也没有发生。 Based on this answer , I am guessing the installer is trying to create the jdk_combo directory on the C Drive, which is likely impossible.根据这个答案,我猜测安装程序正试图在 C 驱动器上创建 jdk_combo 目录,这很可能是不可能的。 Is there any alternate method of installing the JDK or a solution that will allow me to use the installer?有没有其他安装 JDK 的方法或允许我使用安装程序的解决方案?

我不得不在另一台机器上运行 jdk 安装程序,然后从 AppData 文件夹中获取 MSI 从这里得到解决方案。

  1. Install the JDK in any drive (suppose H:\\Java_RE )在任何驱动器中安装 JDK(假设H:\\Java_RE
  2. Then go to, This PC >> Properties >> Advance system settings >> Environment variable >> System variables >> Path然后去, This PC >> Properties >> Advance system settings >> Environment variable >> System variables >> Path
  3. Click Edit单击Edit
  4. Click New点击New
  5. Browse the path (ex: H:\\Java_RE\\bin )浏览路径(例如: H:\\Java_RE\\bin
  6. Click Ok .单击Ok

I Have faced a similar issue while installing java on my D drive.我在 D 盘上安装 java 时遇到了类似的问题。 Later I found that it was due to the previous path existing in the environment variables.后来发现是环境变量中存在之前的路径导致的。 Check for any previous JDK or ORACLE paths existing in environment variables.检查环境变量中是否存在任何以前的 JDK 或 ORACLE 路径。 In my case, I have deleted the below path it worked for me.就我而言,我删除了以下对我有用的路径。

C:\Program Files (x86)\Common Files\Oracle\Java\javapath. C:\Program Files (x86)\Common Files\Oracle\Java\javapath。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM