ns have collection JAVA_home in my mechanism C:program FilesJavajdk1.8.0_131in; and also i am trying to operation cordova command( cordova build ) top top command prompt, however I"m gaining ns error bellow. Ns have tried every ns ways, yet no may be to solve thins issue:

ERROR: JAVA_residence ins collection to an invalid directory: C: egimen FilesJavajdk1.8.0_ 131in;

Please, set ns JAVA_residence change in her environment to match theplace the your Java installation.

You are watching: Java_home is set to an invalid directory






JAVA_home have to suggest come ns residence jdk directory, and no come jdk/bin directory.

you must collection ns JAVA_house prefer this:

JAVA_HOME="C: egimen FilesJavajdk1.8.0_131"


try ns following:

Rerelocate in indigenous JAVA_home path.open brand-new command also line window.run your command as a administrator.
~ above window 10, ns problem wAs with the semicolon ;.

go come edit the device atmosphere variablens and also delete ns semicoltop top in ~ the finish the JAVA_house value C: outine FilesJavajdk1.8.0_144

In other words, transform thins C: egime FilesJavajdk1.8.0_12; come C:program FilesJavajdk1.8.0_12

girlfriend might need to delete her entry in the home windows Dialog in and develop a new one. If friend ever before hADVERTISEMENT a lot of entriens and also obtain the enlarge develop view, windows instantly inserts a ; at ns finish of each entry, also if girlfriend just have a enattempt left.


Share
improve this price
Folshort
edited jan 9 "20 in ~ 11:38
jan K.
333 bronze title
answered Jun 7 "18 at 11:38
MehrdADVERTISEMENT SalimiMehrdAD Salimi
1,14833 yellow badges1515 silver- badges2929 bronze badges
0
add a comment |
12
JAVA_residence need to be C: egimen FilesJavajdk1.8.0_172 do not encompass semi-colon(;) or bin in path. Any jdk variation above 7 will work. Also, you must re-start the cmd


Shto be
enhance this answer
Follow
answered Jutogether 30 "18 in ~ 11:07
Pawone MaheshwariPawa Maheshwarns
14.3k11 yellow badge4646 silver badges5050 bronze badges
0
include a comment |
9
set JAVA_HOME as C:program FilesJavajdk1.8.0_172

execute not use semicolon ";" via over JAVA_house value

to verify that ins is effectively set, walk come command also prompt examine for C:.......>sdkmanager --list

a finish list will certainly show up the will certainly let friend currently that ins ins effectively saved.

else ins will show error that JAVA_house route is not appropriately set.


Share
improve this price
Follow
edited Jutogether 11 "18 in ~ 10:14
reply Jul 10 "18 at 6:59
Shailja PandeyShailja Pandey
9111 silver- badge33 bronze title
0
add a commenns |
4
after ~ setting the JAVA_house variable, operation androi would studio together administrator


Shto be
improve this answer
Folshort
reply Apr 30 "19 at 1:21
Raafat AlhmidiRaafat Alhmidns
91099 silver badges1717 bronze badges
include a commenns |
3
friend need to collection via only C:program FilesJavajdk1.8.0_12.

and also inspect via utilizing new cmd. It will certainly be updated


Share
improve thins price
Folshort
reply Jun 17 "19 at 7:18
MakMak
93566 silver badges1717 copper title
include a commenns |
3
initially attempt removing the "in" native ns course and collection the house magazine JAVA_house together below:JAVA_house : C: outine FilesJavajdk1.8.0_131

Second Update device PATH:

In “atmosphere Variables” window under “system variables” choose Pathclick on “Edit…”In “edit atmosphere variable” home window click “New”kind in %JAVA_HOME%in

third rebegin your docker.

refer to the link because that setting ns java route in windows.


Share
boost this prize
Follow
reply Sep 2 "20 at 8:22
Subrata SarkarSubrata Sarkar
6133 copper badges
add a commenns |
2
ns found thins when googling ns problem through androi would licences when installing Flutter.

because that Linux, update your ~/.bashrc (or other Shell config) File by including thins heat in ~ ns end:

JAVA_HOME=/usr/local/android-studio/jreNote: ns set up Androidentifier studio through complying with the main environment overview because that Linux (link).

for Windows, usage ns androi would studio"ns course come ns jre brochure and also upday the atmosphere variable via ns ideal value.

Then, operation flutter doctor --android-licenses and push y to review the licencens i beg your pardon are no accepted.press y because that every of ns licences. It will ask Accept? (y/N): in ~ the end the the license file.after girlfriend expropriate every unwelcomed licences, friend have to see:

every SDK packEra patent welcomed
Share
enhance thins prize
Folshort
reply Sep 29 "20 at 16:06
AleksandarAleksandar
1,7942323 silver- badges3333 copper title
add a comment |
1
i thoctopus friend should rerelocate the ";" from the finish of ns java path.


Shto be
boost this prize
Folshort
reply Ocns 1 "18 at 8:10
Mostafa YehyaMostafa Yehya
3933 bronze title
1
add a comment |
1
please rerelocate /bin and also even semi coltop top ; indigenous JAVA_home to resolve.


Shto be
boost thins price
Folshort
answered Sens 30 "20 at 11:18
Shashank GShashank g
70611 yellow badge1313 silver badges2525 copper title
add a commenns |
1
inspect because that duplicate entriens that JAVA_home in system variables.

In mine situation namong the over answerns functioned however i hAD 2 entries for JAVA_residence and rerelocating one worked.


Share
boost thins prize
Follow
answer Jun 1 in ~ 6:54
Shivam MishraShivto be Mishra
3166 bronze badges
add a commenns |
0

ns was making use of jenv

In mine case, i wtogether using jenv however did no collection ns java version, so the course the jenv was pointinns in reality a Java installation.

as soon as i rone echo $JAVA_HOME, it verified /Users/username/.jenv/versions/system, and also tright here wtogether no together File or directory.

collection a variation that java

ns simply hADVERTISEMENT come perform jenv global 15 or jenv regional 15, come clues what version ns wanted to in reality use, and JAVA_home changed as soon as i re-rone echo $JAVA_HOME.

See more: Sparkster: Rocket Knight Adventures 2 (Sparkster) All Bosses (No Damage)


Share
enhance this answer
Folshort
reply Jun 25 in ~ 16:22
Ben ButterworthBen Butterworth
9,28422 yellow badges4444 silver- badges6060 copper badges
include a comment |
0
~ above linux:

to uncover ns course java -XshowSettings:nature -version 2>&1 > /dev/nultogether | grens "java.home"result e.g. Java.house = /usr/lib/jvm/java-11-openjdk-amd64copy: /usr/lib/jvm/java-11-openjdk-amd64include line in her confins bash Data (e.g.~/.zshrc): export JAVA_HOME=
Share
improve thins price
Folshort
reply Jul 21 in ~ 14:23
LuanLuanLuanLuanLuanLuone
10311 silver- badge88 copper badges
add a comment |
extremely active question. Knife 10 call (no countinns the association bonus) in stimulate to prize this question. Ns call necessity helps protect this Question indigenous spto be and also non-prize activity.

not ns prize you're looking for? browser other inquiries tagged java androi would cordova or asking your very own question.


the Overflow Blog in
Featured ~ above Meta
Linked
-2
acquired any type of error if installing Androidentifier studio ~ above home windows 10
0
ERROR: JAVA_house is collection to an inprecious directory in libGDX
1
cordova build worry - javac - version faicaused run
3
Error: JAVA_home ins set to a inprecious directory
0
ns might not operation mine react-indigenous task because of java installation
1
Flutter run problem on androidentifier ERROR: JAVA_house ins set to one inprecious directory
0
Android development setting set up worry came if trying to run reaction indigenous app
related
436
just how come set java_residence on home windows 7?
1010
Can't start Eclipse - Java wtogether began but changed leave code=13
44
via android studio no jvm found, JAVA_house has actually been set
2
Maven and also Java_house
3
Error: JAVA_house is collection to a inprecious catalog
24
JAVA_residence is set come an inprecious magazine while running ./gradlew ~ above OSX
0
just how to set JAVA_home setting variable in Intellns J
1
after ~ installing jhipster JAVA_house ins collection to one inprecious brochure
hot Network concerns even more warm inquiries
Inquiry feeding
subscribe to RSns
Concern feeding come i ordered it to this RSns feed, copy and paste thins URl into your RSs reader.


lang-java
stack Overflow
assets
company
ridge Exchange Netjob-related
website style / logo design © 2021 stack Exadjust Inc; user contributions a license is granted under cc by-sa. Rev2021.11.8.40681


ridge Overcirculation functions best through Javamanuscript enabled

your privacy

by clicking “accept all cookies”, girlfriend agree stack Exadjust have the right to keep cookie top top her device and disclose information in accorrun via ours Cookie Policy.