The specified JDK folder doesnot contain JDK (NetBean IDE Installer) - java

This appears in netbeans IDE Installer,
what should I do here?

I had that issue when my JDK version was too far ahead of NetBeans. JDK 11 was a problem.
When I installed JDK 8.x, the NetBeans installation worked.
Also, note that the NetBeans installer requires the JRE in addition to the JDK, but doesn't mention this at first. (Again, I used JRE 8.x).

This error means, that you put invaild JDK directory. Maybe it happens becouse you are addin "\lib" at the end - try without this.
You need to find place, where JDK is installed. Try to use "where javac" or this code below:
C:> for %i in (javac.exe) do #echo. %~$PATH:i
Write this into cmd.exe, and then copy and paste this address in NetBeans (JDK for the Netbeans IDE).

Related

Eclipse not using the specified JDK

Eclipse was so far using the installed jre "jre1.8.0_261". I want eclipse to use jdk. I have changed the eclipse.ini and have added the following :-
-vm
C:\Program Files\Java\jdk1.8.0_191\bin\javaw.exe
Moreover, I have changed the windows preferences with Installed JREs as the one offered by the jdk "jdk1.8.0_191". The java build path has been also aligned to use "jdk1.8.0_191" .
However under the configuration of Eclipse IDE Installation, I could still see that Eclipse is using the previously used jre version as vm.
-vm
C:\Program Files\Java\jre1.8.0_261\bin\server\jvm.dll
However, I want Eclipse only to use the mentioned JDK. Is there any solution to this?
Eclipse can use one Java distribution to run Eclipse, and any Java distribution to compile code with. It can certainly use a different distro to run than it uses to compile code. You can even have different projects using different distros.
It's probably best to have a single "-vm" option in the "eclipse.ini" file, which specifies the latest version of Java (I suppose it's possible it could just be a JRE, but I haven't tried that). Then, install the JDK of whatever version you need, and specify that in the "Installed JREs" list. Make sure that the page underneath that, "Execution Environments" maps the "JavaSE-1.8" to your installed JDK.

Netbeans does not detect JDK installation

I have installed Netbeans 8.0.2 and it doesn't find the JDK installation path.
I suppose I have done all the steps correctly. Netbeans insists that I haven't installed the JDK.
How can I solve this issue?
[
This error exists because, you haven't configured the Environment Variable on your PC, that's why NetBeans is not detecting it. I recommend you to check this link.
Or you may Uninstall/Delete the existing NetBeans and JDK installer and download and install from here. It has package already linked with JDK, so you don't have to configure it later.

JRE Missing when installing eclipse

So I'm trying to install Eclipse IDE for Java on my main pc.
I had no problem installing it on my laptop but when trying to install it on my PC I get JRE Missing webpage.
I've installed the JDK and JRE and they are both working. I could use some advice.
i also had the problem with eclipse and the JRE.
Try to delete the 2 Java versions and deinstall eclipse.
then install the JDK first and seccond the JRE. after the 2 installations install the new eclipse version(in the installer you chan choose between some installations take the first).
i hope I can help you.
Unless explicitly told in eclipse.ini Eclipse uses the system wide java command.
Easiest for you right now is to install a system wide JRE (same 32/64 bit flavor as eclipse).
I had the same issue. It was happening when installing different match of JDK version (11 in my case), with JRE (8 in my case).
So, in order to have this installation of Eclipse working make sure that you have both JDK and JRE referring to the same version. Installation will not work if they have different versions.

JDK for Eclipse(in windows platform)

My qustion is really simple, all in the title.
After some tests I found that by given a JRE/bin directory in the path(environment variable) , Eclipse can run normally with no problem. And Eclipse will never try to find the JRE by using JAVA_HOME variable.
And in eclipse, I know that I can add installed JREs in the window preference and choose a JDK folder instead of a JRE folder. And for each project, we can change the compiler level.
Since Eclipse can also compile the codes, when is JDK used? Debug? or what?
Eclipse uses its own compiler to compile Java code. It is different than the javac compiler that comes with a JDK. In fact, you don't need a JDK to compile and run normal Java projects in Eclipse. A JRE is obviously needed to reference the required Java libraries.
However if you are using Maven or some other tools that sometimes depend on a JDK component, then you need to install a JDK on your machine. For example, Maven has an option to rely on the tools.jar that comes shipped with a JDK.
Eclipse uses the JRE you specified as default or per project settings. This could be a (only) JRE installation or a JRE from a JDK installation.
I think the more interesting question is: When should I use a JDK instead of an JRE?
The JDK includes tool that are not included in the standalone JRE. E.g. the javadoc.exe for exporting the documentation from javadoc annotated comments in the code. This Program is not included in a standalone JRE. so if you want to export your javadoc documentation you need to add an installed JRE based on a JDK installation first, so Eclipse is able to use the javadoc tool.
It could be a little hard to give a thorough answer to this but I know that at least for using Maven/m2e Eclipse needs to be run in a JDK.
First of all eclipse is a java code it wouldn't run without java installed to prove it (on your personal expence) copy the eclipse folder elsewhere and uninstal the JDK and try to run jave it wouldn't it would output the error message no JDK but instal JDK and run eclipse from the copied location it would run as a first time asking you about the workplace directory!.

How Intellij runs without any JRE installed?

I've read here that Intellj is written in java,
how then it can run without any JRE installed on the machine?
It cannot. Requirements clarifies that at least JDK 6 must be installed.
I guess some distributions might have it bundled but it is not the case for standard one version 12.
IntelliJ IDEA comes with JRE. Just look inside IDEA installation folder where you can find jre folder.

Categories