Installing latest version of Netbeans IDE?
Trying to install the latest netbeans from Oracle, which is usually easy, and do 'bash netbeans-7.1.1-ml-linux.sh'. The installer starts but says that 'no compatible JDK was found'. Eventually the installation does not work.
So I install the JDK from the Oracle web site, download the tarball and unpack it in my home directory. Then try to install netbeans in my home directory. Same thing happens, 'no compatible JDK was found'. I enter the path to the JDK manually, when invited to do so, but it say: 'an unknown error occured while validating the path'. Anyone know how to fix this? Thanks any help. |
My suggestion is to read through the installer script. Look for path variables that you can edit. That may do the trick.
|
Since you say bash, are you in some other shell at that time?
|
While I realize this thread is over 8 years old; I had exactly the same issue myself and managed to solve it (as Java is one of the programming subjects for the programming course I'm currently doing and NetBeans is the IDE they use, and I wanted to install it on my Linux machine), and since I found this thread and it deserves an actual answer...
The problem is that the NetBeans IDE seems to be tied to the same version as Java JRE (Java Runtime Environment) & JDK (Java Development Kit) itself. In other words, and for example, if you have downloaded NetBeans IDE 12.6, then you need Java JRE & JDK version 12 installed, or the NetBeans installer will not let you install the NetBeans IDE. In my case, once I realized this and installed the right version of Java JRE & JDK, the NetBeans installer finally automatically found Java and stopped complaining, and the NetBeans IDE installed with no problems! (and the NetBeans IDE itself seems to run with no issues so far either!) I also got another error that was also easy to fix - once I figured out which Java package contained the library mentioned below: Code:
An error occured while initializing the NetBeans IDE installer UI. On my system that would be the following packages: * java-<version>-openjdk-devel (the JDK development package) * java-<version>-openjdk-gui (for the libawt_xawt.so library) Replace <version> with the actual version of Java that is required (that matches the version of NetBeans you've downloaded and want to install). Also, if you use a Debian-based distribution, you'll likely need to replace "devel" with "dev", as Debian/deb based distros tend to use a different naming convention for packages compared to rpm based distros. The exact names of said packages themselves may also slight differ depending on your particular distro as well. While the following may or may not be required depending on your situation, you may need to also make sure your JAVA_HOME environment variable is pointing to the right directory for your Java JRE & JDK install. You probably won't have to worry about this if you didn't have Java already installed beforehand, since the installation of the Java JRE should take care of this for you in that case. But if on the other hand you did already have a different version of the Java JRE & JDK installed already, then you may need to make sure the JAVA_HOME environment variable is pointing to the right Java install. To check you can type the following as root (to check it for all users); Code:
env | grep JAVA Code:
JAVA_HOME=/usr/lib/jvm/java-12-openjdk You can set it manually if need be like the following; Code:
export JAVA_HOME=/usr/lib/jvm/java-<version>-openjdk You'd have to either edit the appropriate config file in the /etc directory to make it system-wide (apply to all users), or export it in the appropriate config file for your shell to make it permanent. The link below explains how exactly to do this - it should apply to almost any distro (if not any distro), not just to Ubuntu: https://keepgrowing.in/java/how-to-p...ome-on-ubuntu/ |
Thank you for the detailed explanation. Many of us are aware that versions of dependent packages should match for compatibility reasons, but some may not understand that and your explanation makes it clear.
|
Quote:
|
All times are GMT -5. The time now is 02:36 PM. |