I am trying to install Netbeans but it gives me this error:
The is no JRE at the location C:\Program Files\Java\jdk11.0.2
I have tried specifying --javahome argument to the installer but still nothing and it is installed as you can see in the snippet attached.
Thanks!!
Netbeans 8 does only support java 8, better upgrade to Netbeans 10 which works with Java 11.
Related
I am setting up a new machine after a long time.
I installed java using home brew:
brew install openjdk
In my .zshrc file I added:
export PATH="/usr/local/opt/openjdk/bin:$PATH"
Running 'java -version' gives the following output:
openjdk version "18.0.1.1" 2022-04-22 OpenJDK Runtime Environment
Homebrew (build 18.0.1.1+0) OpenJDK 64-Bit Server VM Homebrew (build
18.0.1.1+0, mixed mode, sharing)
When I try to run the netbeans 13 installer pkg, I get the following message:
No Java Found NetBeans IDE cannot be installed. This software can be
installed with Java 8 or newer. Please download and install the latest
update of Java 8 from
http://www.oracle.com/technetwork/java/javase/downloads/index.html and
restart NetBeans installation.
I figured maybe I need to set the java home variable. But not sure where the correct location is. I tried:
export JAVA_HOME=/usr/local/Cellar/openjdk/18.0.1.1/libexec/openjdk.jdk/Contents/Home
But the error is still there.
Have I set my JAVA_HOME variable correctly ? How can I make sure that I have set the correct location ?
How can I get the Netbeans installer to install ? Why does it not see the JDK ?
EDIT:
If I run the following command:
/usr/libexec/java_home
Then I get the output:
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
This is because I installed java via homebrew and did not see this message output in the end:
For the system Java wrappers to find this JDK, symlink it with sudo
ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk
/Library/Java/JavaVirtualMachines/openjdk.jdk
Run the command above to create the symlink, then netbeans installation proceeds. Wasn't necessary to set path or home. Set cpp flags because cpp is cool.
Even for other versions such as 11 it may be necessary to run a similar command. Homebrew mentions it, but unless you’re paying attention may not notice it at the end of the installation.
I suspect the problem is that the NetBeans 13 installer does not support the use of JDK 18, because NetBeans 13 itself does not officially support JDK 18. From the Release Notes (with my emphasis added):
The Apache NetBeans 13 binary releases require JDK 11+, and officially
support running on JDK 11 and JDK 17.
Also, note that:
NetBeans 13 was released on March 4, 2022.
JDK 18 was released 18 days later, on March 22, 2022.
So while NetBeans 13 may appear to run fine with JDK 18, it seems probable that the installer does not support the use of JDK 18, which didn't even exist when the installer was released. Unfortunately the installer is providing a very poor error message when you attempt that:
No Java Found NetBeans IDE cannot be installed. This software can be
installed with Java 8 or newer. Please download and install the latest
update of Java 8 from
http://www.oracle.com/technetwork/java/javase/downloads/index.html and
restart NetBeans installation.
The installer's error message is highly misleading for two reasons:
Instead of "No Java Found" it would be more accurate if the error was "No supported version of Java found".
The advice "Please download and install the latest update of Java 8" makes no sense because NetBeans 13 doesn't even support the use of JDK 8.
So this looks like an issue with the NetBeans Installer rather than NetBeans or Java 18. You have a couple of workarounds:
Run the installer using JDK 17 instead of JDK 18. Once you have NetBeans installed and running on JDK 17, you can then add JDK 18 as a second Java Platform, or edit netbeans.conf so that NetBeans will use JDK 18 instead of JDK 17 after a restart.
Don't use the installer at all. Instead, just download the zip of NetBeans named netbeans-13-bin.zip, unzip it, and then edit netbeans.conf so that NetBeans will use JDK 18.
I got the following message when opening netbeans that jdk has not been found on this computer. I have got the jdk installed, and set the bin directory in the environment. Btw, I am using Windows 10 pro 64 bit.
I have tried this in the command prompt.
C:\Users\admin\Downloads>netbeans-8.2-windows.exe --javahome "C:\Program Files (x86)\Java\jdk-10.0.2"
but then i get this message.
It's only the launcher stub.
OS: x64
Does someane know what i can do about this?
Thanks.
Java 8 is still the standard for now. Uninstall java 10 and install this and reset your env vars.
http://www.oracle.com/technetwork/pt/java/javase/downloads/jdk8-downloads-2133151.html
Your computer is 64bit. so your jdk should be in Program Files not Program Files(x86)
C:\Users\admin\Downloads>netbeans-8.2-windows.exe -javahome "C:\Program Files\Java\jdk-10.0.2"
JDK 8 was the latest version at time of NetBeans 8.2 is developed. For that reason, JDK 8 is required for installing and running all NetBeans Bundles of version 8.0 - 8.02. They do not run on JDK 9 or later.
Download JDK 8
Download latest version of NetBeans
Still trying to get Eclipse IDE to work and running into Incompatible JVM error. I followed the steps here: I installed Java 7 but Eclipse keep saying that 1.6 is not suitable for this product
But unfortunately to no effect. Running OSX 10.9.5 and uninstalled the out-of-the-box version of Mac. The new version of Java seems to show up in the System Preferences. Please see attached screen capture. I've even done some of the basics like restart my computer, etc. Maybe there are other modifications I need to make to other files. I'm comfortable with Terminal but new to Eclipse and Java.
I have had the same problem as noted above. I could not get Eclipse to install because of Java incompatibilities. The sequence I followed goes like this:
Upgraded to MAC OS Sierra
Downloaded the Eclipse installer but was prompted that I needed to instal a legacy Java.
Installed Java 1.6
Was unable to install Eclipse and was prompted that I needed Java 1.7 or greater. Downloaded and installed Java 1.8
Ran the terminal code 'java -version' // this will check your jre version. This showed returned Java 1.6 despite the fact that I had upgraded to 1.8. The Java version listed in the Java control panel said 1.8
Tried multiple downloads of eclipse and Java and multiple restarts always with the same result.
Visited the Oracle web page noted above:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html I could not find the above reference to 8u73 and 8u74 but I did find and option to download 1.8.0_12. I did this. It installed without difficulty, and then I was able to install Eclipse without difficulty.
This took hours of my time. I hope this proves useful.
OK, so I don't really know what the problem was, but I simply fixed it by navigating to here http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html and installing 8u74 instead of 8u73 which is what I was prompted to do when I would go to "download latest version" in Java. So changing the versions is what did it in the end. Eclipse launched fine, now. Thanks for everyone's help!
edit: Apr 2018- Now is 8u161 and 8u162 (Just need one, I used 8u162 and it worked.)
JRE is a Run-Time Environment for running Java stuffs on your machine. What Eclipse needs is JDK as a Development Kit.
Install the latest JDK (and not JRE) from http://www.oracle.com/technetwork/pt/java/javase/downloads/jdk8-downloads-2133151.html and you should be good on Mac!
Open up terminal and check what java version is currently set in your path variable.
You can do that by typing in your terminal
java -version // this will check your jre version.
javac -version // this will check your compiler version
If this shows incorrect java version but you have installed java 1.8 then you have to set path variable to the newer version of java.
To do that do add the line:
export JAVA_HOME=/path/to/java/jdk1.x
to ~/.bash_profile (same as /Users/username/.bash_profile)
Then do this from the terminal to set the new variable
source ~/.bash_profile
Also what's your eclipse.ini set to ?
-Dosgi.requiredJavaVersion=1.7
EDIT:
Please open up terminal and type
find / -name "java" // This should find all folder named java on your file system.
Also how did you install java in the first place ?
Echoing the answer, above, a full install of the JDK (8u121 at this writing) from here - http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html - did the trick. Updating via the Mac OS Control Panel did not update the profile variable. Installing via the full installer, did. Then Eclipse was happy.
Here are steps:
download 1.8 JDK from this site
install it
copy the jre folder & paste it in "C:\Program Files (x86)\EclipseNeon\"
rename the folder to "jre"
start the eclipse again
It should work.
For some weird reason "Java SE Development Kit 8u151" gives this trouble. Just install, "Java SE Development Kit 8u152" from the following link-
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
It should work then.
I downloaded Eclipse (specifically that for C/C++ Programming) for Mac, running OSX Mavericks. When I try to start Eclipse, it gives me this message: "Version 1.6.0_65 of the JVM is not suitable for this product. Version 1.7 or greater is required", and it doesn't open. I installed Java version 7, but nothing changed. I don't know how else to update the JVM (I don't know much about Java in general).
I downloaded the 64-bit version for my MacBook Air, if that matters.
Simply Install the JDK 7 or JDK 8, and not just the latest JRE.
Run whereis java in a Terminal. It will normally display something like /usr/bin/java.
Now run java -version. It shows you 'java version 1.6.0_65' or something approaching. This is because Java 7 does not replace Java 6. Java 7 is installed as an Internet Plug-in and can be found in /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java.
What you need to do is to symlink /usr/bin/java to /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java.
Restart Eclipse, or reboot your computer (I don't know how Eclipse manages this), and it should do the trick. :)
I went to oracle downloads and the scrolled one of the several Mac osX links and downloaded jdk-8u73-nb-8_1-macosx-x64.dmg from oracle and that fixed the problem. I don't know why updating java doesn't do the trick.
add this script into 'eclipse.ini' at the top
'/Library/java/JavaVirtualMachines/jdk1.8.0_77.jdk/contents/Home/bin'
Trying to install eclipse, I installed java version 1.6.0_65 as it requested yet still was blocked from finishing the Eclipse install with the error that I needed 1.7 JVM or higher - not true, installing higher didn't work either. I tried installing jdk-8u101-macosx-x64.dmg and that didn't work. So, I tried JDK 7 as advised, sorry no good.
So, to get the Eclipse installer to run with out that java error I had to edit the Info.plist inside the Eclipse Installer. Right click the Eclipse installer and show package contents, then open info.plist in textEdit.app
(Note: So after several tries editing this plist and following methods mentioned elsewhere nothing worked, I found that you have to use the symlink or java alias because java is installed differently now a days as an internet plugin.)
Where you want to make an edit (You should probably Backup the original or you can download it again), under <key>Eclipse</key>, then <array>, delete out what's there and add <string>-vm</string> and this string underneath; <string>/usr/bin/java</string>
Here is what mine looks like.
<key>Eclipse</key>
<array>
<string>-vm</string>
<string>/usr/bin/java</string>
<string>-keyring</string>
<string>~/.eclipse_keyring</string>
<string>-showlocation</string>
</array>
Then save and try running your eclipse installer; this worked for me.
Just running the below command from there terminal worked for me.
brew cask install java
It updated my idk with 1.8, and after that eclipse opens successfully.
I get the following error when i try to run ./studio.sh from command line:
'tools.jar' seems to be not in Android Studio classpath.
Please ensure JAVA_HOME points to JDK rather than JRE.
And here are the paths, which appear to be correct to me:
export JAVA_HOME=/usr/lib/jvm/java-7-openjdkg
export PATH=$PATH:/usr/java/jdk1.6.0_27/bin
Help is greatly appreciated.
No, they're incorrect.
You need the Standard Edition Oracle JDK, not the OpenJDK
Also, you need JDK 6, not 7 (yes, 7 is backward-compatible, and it's been reported to work for Android, but the official android documentation only says that it supports 5 or 6)
And yes, it does seem like you have 1.6 and 1.7 installed (I just noticed that after you made your edit), but you seem to be confused about which one you should be using in your environment variables.