Installing JDK without administrator privileges

前端 未结 14 1671
旧时难觅i
旧时难觅i 2020-12-13 00:13

I am trying to install JDK at office laptop but it says I need administrator privileges. I have only access to my own account at work.

How can I install the Java Dev

14条回答
  •  遥遥无期
    2020-12-13 00:59

    Here are all the steps that got the JDK installed on Windows 7 without admin rights.

    1. You need the cabextract program to extract the installer files. I tried 7zip but it didn't extract the cab properly. Instead, I used cygwin. You can get the setup.exe program from their website, but you must rename it because Windows assumes that anything called "setup" requires admin rights. I renamed it to cygwin.exe. Run that. It'll ask you where to install. I chose the cygwin directory in my home directory. When the pop-up asks you which programs to install, type "cabinstall" in the search bar. Expand the "Archive" section and make sure the "cabinstall" is not set to "skip". (Click the "skip" text until the highest number shows.) Proceed with install. This takes a few minutes.

    2. Optional: Add cygwin\bin to your path. Do this from control panel, user accounts, change my environment variables, edit PATH.

    3. Download the JDK. I downloaded jdk-6u45-windows-x64.exe.

    4. In the directory where that file is: mkdir tmp

    5. cd tmp

    6. cabextract ..\jdk-6u45-windows-x64.exe

    7. Make a new directory for the actual JDK. I used jdk in my home directory.

    8. Extract the tools.zip file into that. It comes with the Java runtime, so you don't need the other files in the original cab, such as jre.msi.

    9. Unpack all the .pack files. You can do that manually by running the bin/unpack200 program on them, or use bash (if you installed cygwin above):

      1. bash

      2. for f in $(../cygwin/bin/find . -name "*.pack"); do bin/unpack200 $f ${f%.*}.jar; done

    10. Add jdk/bin to your PATH (see step 2 above).

提交回复
热议问题