简体   繁体   English

Linux / Ubuntu无法找到JVM

[英]Linux / Ubuntu cannot find JVM

I'm trying to install Netbeans to learn PHP. 我正在尝试安装Netbeans以学习PHP。

I chose the all option from here 我从这里选择了全部选项

https://netbeans.org/downloads/index.html > https://netbeans.org/downloads/index.html >

And when I tried installing it on terminal, it said I needed JDK 7. After downloading and installing JDK 7 from 当我尝试在终端上安装它时,它说我需要JDK 7。

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

I tried to install netbeans again and it gave me the same message; 我试图再次安装netbeans,它给了我同样的信息。 that JDK is not installed and I need to install it. JDK未安装,我需要安装它。

What should I do to get netbeans to isntall? 我应该怎么做才能使netbeans进入isntall?

Did you try using the Package manager? 您是否尝试过使用包管理器? You should already have a JRE installed by default, but you should be able to use: 默认情况下,您应该已经安装了JRE,但是您应该可以使用:

sudo apt-get install openjdk-7-jdk

To verify that you actually installed Java on your system you can try: 要验证您是否在系统上实际安装了Java,可以尝试:

java -version

Once you have that you should be able to run netbeans by using the netbeans.sh script in the bin/ of the netbeans download. 一旦有了,您应该能够通过使用netbeans下载的bin /中的netbeans.sh脚本来运行netbeans。 If I remember correctly it doesn't really install anything, just runs from there. 如果我没记错的话,它实际上并没有安装任何东西,只需从那里运行即可。

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

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