没有管理员权限安装JDK [英] Installing JDK without administrator privileges

查看:1601
本文介绍了没有管理员权限安装JDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在办公室笔记本电脑上安装JDK,但它说我需要管理员权限。我只能在工作时访问自己的帐户。



如何在没有管理员权限的情况下安装Java Development Kit?

解决方案

以下是安装没有管理员权限或没有管理员密码的java的解决方法。为此,您需要安装cygwin,不需要管理员权限。
在utils中确保选择cabextract.exe进行安装。



Fireup cygwin bash shell。



键入cabextract jdk1.6.exe< - jdk文件名



这会将所有文件解压缩到当前目录。



将tools.zip移动到新目录并解压缩它使用cygwin或Windows资源管理器。这将是你的java目录。



提示:尝试使用7zip而不是cabextract和cygwin。如果它工作,它会快得多。



编辑:这不会让您使用最新版本的jdk 6和7来运行JDK。许多jar文件(例如rt.jar)都是压缩的,所以他们需要使用unpack200进行解压缩。



只需查看每个目录,查找扩展名为.pack的文件并使用unpack200解压缩,例如:。\ jre \ bin \unpack200。\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\但是我仍然遇到Eclipse问题,因为注释存在一些问题,所以可能还有另一个步骤缺失。



关于超级用户的类似问题提供了一个自动的脚本找到所有.pack文件并将它们解压缩到正确的文件夹中。


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 Development Kit without administrator rights?

解决方案

Here is a workaround to install java without admin privileges or without administrator password. For this you need cygwin installed which does not require admin privileges. In the utils make sure you select cabextract.exe to install it.

Fireup cygwin bash shell.

Type cabextract jdk1.6.exe <-- jdk file name

this will extract all the files into the current directory.

Move tools.zip to a new directory and unzip it using cygwin or windows explorer. This will be your java directory.

Hint: Try to subsitite 7zip instead of cabextract and cygwin. If it works it will be much faster.

Edit: This doesn't get you a working JDK with the latest versions of jdk 6 and 7. Many of the jar files (eg rt.jar) are compressed so they need to be decompressed using unpack200.

Just go through each directory looking for files with a .pack extension and unpack them using unpack200, eg: .\jre\bin\unpack200 .\jre\lib\rt.pack .\jre\lib\rt.jar

This allows you to run java programs however I still had trouble with Eclipse as there was some issue with annotations, so there's probably another step that is missing.

In the answers to this similar question on Superuser is available a script that automatically finds all .pack files and unpacks them in the right folders.

这篇关于没有管理员权限安装JDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆