简体   繁体   English

我想通过命令行安装Java,但没有sudo访问权限。

[英]I want to install Java through the command line but I don't have sudo access.

This is what I have already done: 这是我已经做的:

prompt> wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u60-b19/jdk-7u60-linux-i586.tar.gz"

Then untar it: 然后解压缩它:

prompt> tar xzf jdk-7u60-linux-i586.tar.gz?AuthParam=1404311550_7de85e3ec1ae4acea63f229d9bf50dbell

Rename it: 重命名:

prompt> mv jdk-7u60-linux-i586.tar.gz?AuthParam=1404311550_7de85e3ec1ae4acea63f229d9bf50dbe jdk-7u60-linux-i586.tar.gz

How to I finish the install without sudo access? 如何在没有sudo访问的情况下完成安装?

You don't really have to install it. 您实际上不必安装它。 You should be able to navigate into [your jdk folder]/bin and run ./javac -version. 您应该能够导航到[您的jdk文件夹] / bin并运行./javac -version。

So just add the bin folder to your path and set $JAVA_HOME and you're good to go. 因此,只需将bin文件夹添加到您的路径并设置$ JAVA_HOME,您就可以开始了。

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

相关问题 Java - Linux 上的命令行:运行代码后我没有任何 output - Java - Command Line on Linux: I don't have any output after I run the code Java在新行中打印,我不需要 - Java printing in new line, which I don't want 简化现场访问。 我应该使用反射还是Java 8解决方案? - Simplify field access. Should I use reflection or is there a Java 8 solution? 我已经安装了Android Studio,但是无法通过命令行访问gradle - I have Android Studio installed, but I am unable to access gradle through command line 我在java中调用一个我无法控制的方法。 如果我没有得到它的回应,我想要杀死它并继续前进 - I'm calling a method in java which I have no control of. If I don't get a response from it, I want to kill it and move on make命令需要Java include中的jni_md.h,但是我没有它 - make command needs jni_md.h from java include, but I don't have it Chef-server-ctl安装我不知道该命令 - chef-server-ctl install I don't know that command java.lang.NullPointerException,因为我没有访问表的权限 - java.lang.NullPointerException because I don't have permission to access the table 如何访问我没有存储为变量的JPanel中的元素? 的Java / Swing的 - How to access elements in a JPanel that I don't have stored as a variable? Java/Swing 我不知道如何通过 windows 命令提示符输入 - I don't know how to input through windows command prompt
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM