简体   繁体   English

“可以找到程序'javac'...”

[英]“The program 'javac' can be found…”

My problem: 我的问题:

The program 'javac' can be found in the following packages:
 * default-jdk
 * ecj
 * gcj-4.8-jdk
 * openjdk-7-jdk
 * gcj-4.6-jdk
 * openjdk-6-jdk
Try: sudo apt-get install <selected package>

I am still new to Linux. 我还是Linux的新手。 Right now I on Linux Mint 17.3 Cinnamon 64-bit. 现在我在Linux Mint 17.3 Cinnamon 64位上。 I don't remember which guide I used to install the oracle version but my javac for it is located at: /opt/java/jdk1.8.0_74/bin. 我不记得我用来安装oracle版本的指南,但是我的javac位于:/opt/java/jdk1.8.0_74/bin。

now I have tried multiple solutions on stack overflow with no progress. 现在,我已经尝试了堆栈溢出的多个解决方案,但是没有任何进展。 (also note, I rather not use openjdk, but if I have too....anyways what I have done.. (还请注意,我宁愿不使用openjdk,但如果我也使用过...。无论如何我都做了。

1) A lot of guides I have read about installing oracle version of java is installed in a location such as: /usr/local/java/jdk1.8.0_xx or something similar. 1)我已经阅读了很多有关安装Oracle的Java版本的指南,这些指南安装在以下位置:/usr/local/java/jdk1.8.0_xx或类似的位置。 So due to this, I don't understand how to apply some of the commands to my location since there seems to be other factors / files I can't find in my java location 因此,由于这个原因,我不明白如何将某些命令应用于我的位置,因为似乎还有其他因素/文件在我的java位置中找不到

2) i have read a few different path solutions such as export $Path=".." and etc, or edit profile or edit bashrc and etc with no luck but I could easily not have been doing this correctly since the guides seem to be not for beginners 2)我读过一些不同的路径解决方案,例如export $ Path =“ ..”等,或者运气不好,编辑配置文件或编辑bashrc等,但是由于指南似乎是正确的,所以我很容易无法正确执行此操作不适合初学者

3) most solutions have suggested just installing openjdk which I rather not 3)大多数解决方案建议只安装openjdk,我宁愿不这样做

4) this solution i have not been able to figure out, and that is creating a soft link 4)我无法弄清楚这个解决方案,那就是创建一个软链接

so please, any help will be appreciated, so to verify, 因此,请提供任何帮助,以便进行验证,

OS: Linux Mint 17.3 Cinnamon 64-bit JDK Location: /opt/java/jdk1.8.0_74/bin. 操作系统:Linux Mint 17.3 Cinnamon 64位JDK位置:/opt/java/jdk1.8.0_74/bin。 Openjdk: should have been removed per instructions i did to install orcale version OpenJDK:应该按照我安装Orcale版本的说明删除

sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Are PPA's safe to add to my system and what are some “red flags” to watch out for? PPA可以安全地添加到我的系统中,需要注意哪些“危险信号”?

Also ensure your JAVA_HOME variable has been set to: 还要确保将JAVA_HOME变量设置为:

/usr/lib/jvm/java-8-oracle For this you can use the following command (see step 3 of Manual Install to see how to make it permanent): / usr / lib / jvm / java-8-oracle为此,您可以使用以下命令(请参阅“手动安装”的第3步,以了解如何使其永久化):

export JAVA_HOME=/usr/lib/jvm/java-8-oracle

https://askubuntu.com/questions/521145/how-to-install-oracle-java-on-ubuntu-14-04 https://askubuntu.com/questions/521145/how-to-install-oracle-java-on-ubuntu-14-04

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

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