How to fix error A JRE or JDK must be available in order to run Eclipse | Java |
How to fix error A JRE or JDK must be available in order to run Eclipse | Java |
In this video, I will explain about “How to fix error ‘A JRE or JDK must be available in order to run Eclipse.No JVM was found after searching the following locations’” error.
You might be working on eclipse before successfully without any errors, but suddenly now you are facing this issue. Am I right? Don’t get panic, because I have a solution for you. This is due to any of the following reasons ➳ You indicated the wrong JVM path in your -vm argument of eclipse.ini file. ➳ The eclipse.ini file got corrupted somehow. ➳ The java which eclipse search by default is no longer accessible (because the $PATH is no longer up-to-date or modified/deleted)
A Java Runtime Environment JRE or Java Development Kit JDK must be available in order to run Eclipse,A java Runtime Environment (JRE) or JDK must be available in order to run Eclipse.,JRE or JDK must be available in order to run Eclipse. No java Virtual machine found,jre or jdk must be available in order to run Eclipse,Java Runtime Environment or Java Development Kit must be available in order to run Eclipse.,The Java runtime environment JRE or java development kit JDK must be available in order to run Eclipse,yadagiri reddy,h yadagiri reddy,yadagiri reddy h,h y reddy,hyr,java runtime error,Eclipse error,JRE,javaw.exe,hyr tutorials,H Y R Tutorials,hyr,no java virtual machine was found after searching the following locations,java runtime environment not found,jre not found,java runtime environment not found fix,jdk error,java runtime environment error,java runtime environment not found windows 10,fix java runtime environment not found,how to fix java runtime environment not found,javaw.exe in your current path,fix javaw.exe error
Content
0.03 -> Hello guys, welcome to my channel HYR
tutorials.
2.8 -> today we will discuss about an
5.069 -> interesting topic that is whenever we
are launching an eclipse sometimes we
10.05 -> face this error. A JRE or JDK must
be available in order to run Eclipse
15.96 -> this is the most commonly occurred error
in the Eclipse. so when you are getting
20.85 -> this error what you are probably doing ??
Downloading a new Eclipse that is not
26.22 -> the solution for this.
27.2 -> even sometimes if
you are downloading a new Eclipse again
30.39 -> still the error will not be rectified..
32.878 -> so
today we will see how we can fix this error
35.8 -> so here is my Eclipse and I will
try to launch my Eclipse.
41 -> so you can see the error
43.7 -> it says JDK or JRE is not available to
47.76 -> launch the Eclipse so what we need to do
we can fix this issue in two methods so those are:
55.2 -> Method 1 - Add JDK or JRE bin
folder to the path variable
61 -> and Method 2 - Add javaw.exe location in eclipse.ini file so basically whenever you
69.42 -> are trying to launch an Eclipse, eclipse
will internally look for javaw.exe file
75.7 -> so if you haven't set any path like
JRE or JDK bin folder path, then eclipse
82.229 -> will not be able to find the javaw.exe file then it will throw you that error
88.6 -> whatever we have seen earlier. so
let me show you each method so first
93.21 -> will go with the Method 1 i.e adding
JDK or JRE bin folder to the path variable
98 -> so some of you might have a
doubt that is it required to add only
102.659 -> JDK path?? no, it doesn't require because
Eclipse is looking for javaw.exe file
109 -> javaw.exe file will be
available under JRE and JDK both
115.3 -> let me show you let me open my java
installation directory so here is my
120.119 -> java installation directory I have JDK
as well as JRE so when I open JDK,
125.64 -> I have bin folder here right I just open
the bin folder and you can see the javaw.exe
134 -> file here so similarly let me show
136.71 -> you with the JRE so you can see the javaw.exe inside JRE as well so you can
144.24 -> add JDK or JRE path okay but it should
be pointing to the bin location some of
151.71 -> you might have already added the JDK
path but still you are facing this issue
155.79 -> let me tell you what the reason might be
so when you add the JDK path maybe you
161.37 -> have added only till the JDK folder you
haven't added till bin folder so when you
168.24 -> add only till the JDK it will try to
search in these 12 items
173 -> so the javaw.exe will not be found so then it
will start throwing you that error so
179.94 -> what we need to add exactly is we need
to add bin folder so to add bin folder
185.67 -> to my path environment variables I need
to open my environment variables here
190.32 -> right-click on This PC go to properties ->
go to advanced system settings -> click on environment variables
200 -> so search for the
path variable here so here is my path
203.85 -> variable just click on edit and check if
you have already added any JDK or JRE
210.42 -> path here so here you can see I have
already added JDK path but still I am
216.12 -> able to face the issue right I am NOT
pointing to the bin folder here I am
220.92 -> just pointing to only JDK folder so let
me edit this path and add the bin folder
229.1 -> slash bin okay click on OK
ok ok so now go back to the Eclipse
242.19 -> folder and I will try to launch. so now
you can see it is not throwing any error
249.269 -> and it is asking me the workspace
location so this is how we try to fix
254.79 -> this issue by adding the JDK bin folder
path to the environment variables now we
259.89 -> will see the second method. so now I will
remove my environment variables
266.889 -> because I cannot reproduce the issue right
so I am removing the environment variable
271.84 -> I will leave that as it is like
previously it is pointing to only JDK
278.639 -> okay.. so I will go to eclipse so now you
can see I am able to produce error right
286.77 -> so click on OK. second method is Add javaw.exe location in eclipse.ini file
296.5 -> so where does this file located in?
so when you download an eclipse
302.159 -> after unzipping the Eclipse file you
might see all these folders right
308 -> so just below the executable Eclipse file
you will find Eclipse dot ini file so
314.62 -> this will store the configuration
settings of the Eclipse
317.439 -> like where it should locate javaw.exe file everything you can mention in
322.68 -> configuration settings file. in second
method we are not adding the bin folder
327.279 -> path or anything to the environment
variables we are directly adding it to
332.56 -> the Eclipse.. the difference between
Method 1 and Method 2 is if you have
337 -> multiple Eclipse versions the method 1
will work with all the Eclipse versions
341.949 -> if you have eclipse one Eclipse two if
you have set the bin folder path in the
347.259 -> environment variables you will launch
the Eclipse 1 and 2 without any error
351.629 -> but in second method it is only
restricted to the Eclipse we are not
357.669 -> setting the path at the system level we
are changing the Eclipse configuration
362.56 -> settings so only this Eclipse can be
able to identify where the javaw.exe file
368.3 -> is present. so if you open
the other Eclipse it might throw you an
372.43 -> error because that eclipse.ini file
is not having this javaw.exe file location
378.4 -> so if you are using multiple
Eclipse, I strongly suggest you to go
383.169 -> with the Method 1. but if you are using
only one Eclipse then you can choose the
387.639 -> Method 2 as well and some of you might
be working in some companies where you
392.319 -> might have the restrictions to edit
the environment variables so in that
396.069 -> case you have to obviously go with the
method 2 so now let me show you the method 2
401.8 -> I'll just modify the eclipse.ini file
404.77 -> all you need to do is before VM
args we need to add the javaw.exe file
412.7 -> location okay.. so here click on enter
and I'll write Vm then
422 -> so I'll go to my JDK then bin folder I'll copy this path then javaw.exe right so I'll click on
440.29 -> save now let me go back to the Eclipse
and try to launch the Eclipse again
451 -> so the issue is resolved.. so this is how we
can fix the issue in two methods based
458.41 -> on your needs you can choose the method
and try to fix the issue..
462.5 -> thank you guys thank you for watching my video