Related
I have tried a few things including changing JDK_HOME to the current JDK, removing all jdk and installing jdk8, and reinstalling android studio, but the same issue persists.
I have used the program before and it was working a few days ago
(After wasting half a day on it, finally, I got it running)
I am running it on Windows 8.1. Also, I had JDK 1.7.0_13.
I tried the following:
Open Start menu > Computer > System Properties > Advanced System Properties In the Advanced tab > Environment Variables
Add new system variable JAVA_HOME that points to JDK folder, C:\Program Files\Java\jdk1.7.0_13
Just to be on the safer side, also add new system variable JDK_HOME that points to JDK folder, for example, C:\Program Files\Java\jdk1.7.0_13
Append new PATH in system variable that points to JDK folder, C:\Program Files\Java\jdk1.7.0_13
But still it didn't work. Then it struck me that might be, my Java version is old. I downloaded the latest version from here.
I uninstalled JDK 1.7.0_13 and installed version 8 i.e. JDK 1.8.0_131.
Now do all the above steps but, replace the path with C:\Program Files\Java\jdk1.8.0_131\ OR whichever your latest version is.
Success!! Now it works.
I have installed Windows 10 Enterprise (64 bit). I have also successfully installed the Java Runtime Environment (v9.Build.83.x64).
The problem is, I cannot install any version of Matlab on the PC. I have tried to install different versions. Each one of the installations became stuck when I clicked on setup of Matlab. The installation does not run Java programs and only its icon in the taskbar is shown, but would not run. This also causes the PC to freeze and makes me run task manager and end task setup of Matlab. I did an install and uninstall java but that does not help either.
What could be wrong?
First, make sure that you right-click the Matlab installer file “setup.exe” and select "Run as administrator". If the installer auto-launches from the dvd, cancel the installation, then from the Start menu open “Computer”, then right click on the dvd icon and select “Open in new window” or “Open with file explorer”, the right click on the file “setup.exe” and select "Run as administrator".
Second, the Java Run time Environment may not be the same as full Java. To be sure, go to http://www.java.com/en/download/win10.jsp and download and install java. Windows 10’s Edge does not use java and will fight you a bit on some of the java installation sites.
Third, an old version of matlab (version 7, R14) installed for me on Windows 10, but kept crashing when I started matlab, creating a long dialog with java error references. There are two ways to fix this.
A) As shown in the site:
http://www.vidnis.com/2013/03/how-to-use-matlab-7-in-windows-8-and.html
1) Go to the folder \sys\java\jre\win32. You will find a folder with a name similar to jre1.4.2 or jre1.5.0_07.
2) Open a new window and go to the folder C:\Program Files\Java. You will find a folder named jre1.8.0_91, or a similar version which does not match the Java version in the Matlab folder opened in step #1.
3) Copy (not Move) the entire folder from the folder C:\Program Files\Java to the Matlab folder opened in step #1. You can leave the old Java folder in the Matlab folder or delete it, it doesn’t matter.
4) In the Matlab folder opened in step #1, there is also a file named jre.cfg. Open it with the Notepad text editor, then change the old java version number (such as 1.4.2) to the new Java version (such as 1.8.0_91). Save the jre.cfg file and quit Notepad.
5) Now launch MATLAB, hopefully it works.
B) I also got matlab to run by right-clicking on the matlab.exe icon (or a shortcut icon) in directory MATLAB7\bin\win32, select “Properties”, select the tab “Compatibility”, then under “Compatibility Mode” click the checkbox “Run this program in compatibility mode for” and select “Windows Vista (Service Pack 2)” or any Vista. None of the other options of Widows compatibility worked for me.
Good luck.
I'm having issues trying to boot-up Android Studio
When I try to launch it after installation I'm getting this error:
No JVM Installation found. Please install a 64 bit JDK.
My current system specification:
Operating System: Windows 8.0 64 bit version
JDK installed: JDK 1.8.0
What I have tried:
I have tried what was reported in the error, and also in most of the solutions to set the JDK_HOME variable in environment variables to my JDK path (64 bit version) i.e. C:\Program Files\Java\jdk1.8.0_05
*I also have tried rebooting system, just in case to test if the environment variable is not working without a restart
I have seen these solutions and tried but none of them works, so don't mark it as a duplicate of any of these:
Android Studio installation on Windows 7 fails, no JDK found
With android studio no jvm found, JAVA_HOME has been set
Android Studio start fails on Windows 8 64bit
Android Studio does not launch after installation
Here is the cmd output for java version:
I had the same problem. I tried setting all kind of paths but nothing worked. So I had to do some dirty fix. The only problem with this is that it opens a blank command line window.
I did the following to make it work.
goto the AndroidStudio installation folder.
goto bin folder and open studio.bat in text editor
add set JAVA_HOME=C:\Program Files\Java2\jdk1.8.0//your java path after the ECHO line.
goto Start -> All Programmes -> Android Studio ->
right click on Android Studio and click on properties.
You will see the Target something like <installation path>android-studio\bin\studio64.exe
change it to <installation path>android-studio\bin\studio.bat
Now you can access it by clicking it from the menu.
Note : I tried it with 8, It works.
I reproduced your issue on my Windows 8.1 system :
Installed 64-bit JDK 1.8.0_11.
Installed latest Android Studio Bundle.
Went to Control Panel -> System -> Advanced system settings -> Environment Variables...
Added JDK_HOME pointing to my 64-bit JDK.
Launched studio64.exe
I got the same message you did. Thinking that it might be the environment variable, I did the following :
Went to Control Panel -> System -> Advanced system settings -> Environment Variables...
Changed the name of JDK_HOME to JAVA_HOME.
Launched studio64.exe
It came up successfully !
1 .Download 64 bit version of JDK from here
As shown in next picture, go to Control Panel -> System and Security -> Advanced system settings -> Environment Variables -> New (System variables)
Then add variable name: JAVA_HOME and variable value: C:\Program Files\Java\jdk1.8.0_25
Please note that jdk1.8.0_25 may be vary depending on JDK version.
Click OK button on the rest of the windows left.
1-Right click on Android Studio and click on properties.
2-Replace studio64.exe in link by studio.exe.
Ok, was having this issue as well and this is what fixed it for me. For the record I'm using Windows 8.1 and Java JDK 1.8.31, all 64-bit.
The problem is with the space between "Program" and "Files" in the path set in JAVA_HOME. I've had this problem before but didn't really realize until I was checking the instructions here for setting JAVA HOME, then it all made sense.
In a nutshell, change the JAVA_HOME path from:
C:\Program Files\Java\jdk1.8.0_31
to
C:\Progra~1\Java\jdk1.8.0_31
Make sure to set the correct JDK version number for your installation. Removing the space from the path fixed everything on my system.
As noted on the page linked above,
use C:\Progra~1\ for C:\Program Files\
and C:\Progra~2\ for C:\Program Files(x86)\
depending on where you have the JDK installed on your system.
Note: Just to be clear, before making this change my system correctly echoed the value of JAVA_HOME to be C:\Program Files\Java\jdk1.8.0_31 in the command window, leading me to believe all was well. However, attempting to run %JAVA_HOME%\bin\javac reported that the path could not be found. After removing the space from the JAVA_HOME path the same command runs perfectly.
Uninstall Java 8 and clean your JDK_HOME and your JAVA_HOME enviromental paths. Then install 64bit JAVA 6 or 7 JDK of your preference.
Make sure you set the path in the SYSTEM VARIABLES not in the USER VARIABLES also.....name the variable name as JAVA_HOME and the address as C:\Program Files\Java\jdk1.8.0_25\ be sure that you didn't place any semicolon.
According to Oracle's installation notes, you should download/install JDK for the correct system. For your convenience, I have linked to it from the sentence above. If you still encounter problems, leave a comment. I have written some quick code that will tell you if your JVM is 64 or 32-bit, below. I'd suggest you run this class and leave a comment as to its output:
public class CheckMemoryMode {
public static void main(String[] args) {
System.err.println(System.getProperty("sun.arch.data.model"));
}
}
For me this turns out to be Environment Variables not being inherited.
Quick answer: reboot, than click on studio.bat, not studio.exe or studio64.exe
================ Details =================
"Right Click"-"Run as Administrator" works for me if:
** JDK_HOME or JAVA_HOME was set. (PATH didn't need to be changed for me)
** I run studio.bat, not studio.exe
** Note: By Default I am an administrator on a Microsoft Account (That Microsoft part may be affecting things), and I seldom reboot. I'm running Win8.1 64bit. I installed both JDKv1.8.0.0_25 32bit and 64 bit, and had JRE 32bit and 64 bit already installed (used by other software).
I found there was a difference in clicking on studio.bat, studio.exe, and running studio.bat from a command prompt. There is also a difference if I rebooted or not.
The difference: The System Environment Variables aren't all there depending on how I start the program.
To test:
In start menu drag a copy of "command prompt" to your desktop, then change properties so "Start In" is location of studio.bat
copy studio.bat to studio_debug.bat (one we can mess with)
drag a shortcut of studio_debug.bat to desktop for convenience.
edit studio_debug.bat (right click --> edit)
== Change:
#echo off
== to
#echo on
echo Set===================
set
echo ======================
pause
This may also help in debugging studio.bat:
== change:
"%JAVA_EXE%" %ALL_JVM_ARGS% -cp "%CLASS_PATH%" %MAIN_CLASS_NAME% %*
== to
echo =================
echo Starting: "%JAVA_EXE%" %ALL_JVM_ARGS% -cp "%CLASS_PATH%" %MAIN_CLASS_NAME% %*
pause
"%JAVA_EXE%" %ALL_JVM_ARGS% -cp "%CLASS_PATH%" %MAIN_CLASS_NAME% %*
echo =================
Now when you run studio.bat from command prompt versus double clicking you may see difference in environment variables including JAVA_HOME and PATH. If you do you have same problem as me.
The problem seems to depend on:
did you reboot since changing environment variables?
didn't seem to matter if I was local or microsoft account
may depend whether you are an administrator or other account type
whether you start using studio.bat, studio.exe, or studio64.exe
.
FYI: The actual successful startup command executed by studio.bat on my system was as follows (includes studio64.exe):
"C:\Program Files\Java\jdk1.8.0_25\bin\java.exe" "-Xms128m" "-Xmx750m" "-XX:MaxPermSize=350m" "-XX:ReservedCodeCacheSize=96m" "-ea" "-Dsun.io.useCanonCaches=false" "-Djava.net.preferIPv4Stack=true" "-Djsse.enableSNIExtension=false" "-XX:+UseCodeCacheFlushing" "-XX:+UseConcMarkSweepGC" "-XX:SoftRefLRUPolicyMSPerMB=50" "-XX:+HeapDumpOnOutOfMemoryError" "-Didea.platform.prefix=AndroidStudio" "-Didea.paths.selector=AndroidStudioBeta" -Djb.vmOptionsFile="C:\android-studio\bin\studio64.exe.vmoptions" "-Xbootclasspath/a:C:\android-studio\bin\../lib/boot.jar" -Didea.paths.selector=AndroidStudioBeta -Didea.platform.prefix=AndroidStudio -cp "C:\android-studio\bin\..\lib\bootstrap.jar;C:\android-studio\bin\..\lib\extensions.jar;C:\android-studio\bin\..\lib\util.jar;C:\android-studio\bin\..\lib\jdom.jar;C:\android-studio\bin\..\lib\log4j.jar;C:\android-studio\bin\..\lib\trove4j.jar;C:\android-studio\bin\..\lib\jna.jar;C:\Program Files\Java\jdk1.8.0_25\lib\tools.jar" com.intellij.idea.Main
Hope that helps someone else.
Just make sure that the installed version of both, Android Studio and JDK, are of either 32-bit or 64-bit. If JDK is of 32-bit and Android Studio of 64-bit or vice-verse, then it won't work though you set up JAVA_HOME.
My fix was to remove the double quotes that I had enclosed the JAVA_HOME path in.
Instead of declaring JAVA_HOME as "C\Program Files..."
I removed the " and declared JAVA_HOME as C\Program Files...
I am on Win 7, x64
I also faced the same issue. The solution which helped me was I downloaded and installed 64 bit JDK from this link and set the "java_home" variable to the new JDK installed path like C:\Program Files\Java\jdk1.7.0_45. Hope this helps.
Had the same problem after upgrading my machine from 7 to 10 had to reinstall the JDK all overgain and took me only a few seconds.
Here are the steps I followed.
Go to this link
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Agree to oracle contact agreement.Then pick your windows version in my case is 64 bit after that its ..Next..Next,,once compete you can relaunch your Android studio without any problem. Hope this helps
Here comes the solution.
Just start ANDROID STUDIO as administrator if you are using a non administrator windows profile!
If your environment variables are correct that will do the trick. Enjoy!
Android Studio Works Perfectly fine with Java 1.8 or Java 8. I was also having invalid JVM error. The reason was including ";" (semicolon) at the end of JAVA_HOME path value. The correct format for path value is:
C:\Program Files\Java\jdk1.8.0_xx (Replace xx with your current version)
Do not include ; (semicolon) at the end of JAVA_HOME value
In my case
In Control Panel -> System -> Advanced system settings -> Environment Variables there is no JDK_HOME OR JAVA_HOME
SO
I added an entry named: JDK_HOME pointing to: C:\Program Files\Java\jdk1.8.0_25\ (you have to point this to your JDK instalation path)
And all seems to work fine now
You must just install jdk1.8.0 and then right click on my computer icon and then select properties,then in left panel, select advanced system settings, then in dialog bog select Environment Variables, then in that's dialog box,in section user variables create new variable that's name must be JAVA_HOME and path is C:\Program Files\Java\jdk1.8.0(in my pc) then sytem variable section, select PATH variable and append it's end this path C:\Program Files\Java\jdk1.8.0\bin and then select ok for all dialog box and after this steps run Android studio. And for test, run cmd in windows and run this command java -version if returned a java version and ... it is installed correctly.
Note: I get answer in windows 8.1 64 bit.
This is tested on my Windows 7 64Bit machine.
Quite strange... I had the same issue - WHILE IntelliJ Idea (including the Android Plug-in) was working perfectly.
However, here is what I did to get Android Studio 1.0 working (no step missing -> maybe it will help programming beginners).
Just set up a new environment variable by...
pressing Windows-Key and typing env... you'll see "Edit the system environment variables". Click!
Now click "Environment Variables..."
Under System variables (NOT "User variables") add a new entry named JAVA_HOME and set the value to your Java folder (like C:\Program Files\Java\jdk1.8.0_25)
apply and you are good to go.
PS: I don't know why some people writing about nuclear science when they want to explain how to set the Java path..
The solution is given in the error itself, Goto My computer(Right click)-->properties-->Advanced system settings-->Environment variables-->Create new variable.
Give the following details to it:
Variable name : JAVA_HOME.
Variable value : (your path to java jdk installation folder).
To find the path for java installation, go to program files in your window installation drive (normally C drive). Find folder named JAVA, in that navigate to JDK folder.
Copy the link address from the top, and paste it in the Variable value .
Now Press Ok and once environment variable gets created restart the android studio.
Hope it helps.
if your "enviornment variables" set well, than try to update
Start > All Programs > Android Studio > Android Studio
do right click, click Properties and set android studio sdk path
in
shortcut > Target
If you are using windows 7, make sure you install jdk-xxxx-windows-x64.exe.
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
I had previously installed 32 bit instead of 64 bit version hence it was installed in program files x(86) folder. But if you install 64 bit sdk setup, its installed in program files folder.
Then set the JAVA_HOME='C:\Program Files\Java\jdk1.8.0_65'
It should work fine.
My variables pointed to other system variables so JDK_HOME was
%programfiles%\Java\jdk1.8.0_45
and i had to explicitly change it to
C:\Program Files\Java\jdk1.8.0_45
Similar for JAVA_HOME
My JAVA_HOME was pointing to c:/jre directly. So I changed it to C:/java/jre because it was confused to pick up which one to use, so I changed it to the specific one and it works for me. Note: It is better to have only one JRE install on your machine
I solved the problem in my case by deleting file
C:\Users\username.AndroidStudioX\studio64.exe.vmoptions
( x denotes the version of your android studio so it can be different ) , because I created it before to customize VM options.
It's that simple
Add the your installation path and java path to the default system path by separating the ;
Right click on My Computer-->Properties-->Advances System Setting-->Advanced -->Environment Variables-->Under System Variables category find the "Path"-->add the android installation path and java path by separating with ;...
Believe it works
If it does not work after setting paths in environment variables correctly,
Reinstall Android Studio and it worked for me.
Under my Android Studio\bin there are two folder
studio.exe and studio64.exe
I tried to run the first program and it gives me the mentioned error.
But when running studio64.exe it works.
If setting JAVA_HOME not works, install Visual Studio C++, you can download "all versions in one" installer here: https://www.techpowerup.com/download/visual-c-redistributable-runtime-package-all-in-one/
I think Android does not support Java 8. Officially android need java 6 as mentioned at the below:
https://developer.android.com/sdk/installing/installing-adt.html
Here I'm providing you a good link, hope those will clear this question :
Is it possible to use Java 8 for Android development?
For crying out loud this is so VERY EASY TO Fix!!
Go to : "Control Panel\All Control Panel Items\System" once there click on "Advanced system settings" on the left hand side
The window that pops shows a box that says says Environment Variables! Click it.
Click "add new" to add new variable.
Type JAVA_HOME in the first box and in the second box the address to, IE / in my case C:\Program Files\Java\jdk1.8.0_25 save it. exit everything. THATS IT!!
Enjoy Android Studio!
Obviously for the above to work you have to install java first or how else can you use it or point to it on your pc and all that. The above instructions are amazingly mislead and complicated. For the record I am on widows 8.1, YES it works on latest windows and is ridiculously simple to fix.
-OSG
I have a mac running os x 10.9.4 and I downloaded the newest version of eclipse. It downloaded fine and installed but whenever I try to open it, I get an error that says, "Version 1.6.0_65 of the JVM is not suitable for this product." I downloaded and installed Java 7 and tried opening eclipse again only to get the same error. Anybody know how to fix this? Thanks
Make sure you have the JDK installed. Google will point you to the runtime engine (JRE) if you search for a Java download (probably called jre-7u67-macosx-x64). Click on "show all Java downloads" in the download page and look for a link "looking for the JDK?" on the left . As of today, the JDK can be found here and should have a name like jdk-7u67-macosx-x64 or jdk-8u20-macosx-x64. Both should be fine for a recent Eclipse Luna install.
If you want to run Eclipse Luna with Java 1.6, you can change the entry in the .ini file. Open the Eclipse application bundle by control-clicking and select "show contents". You will open a new finder window with a single folder "Contents". Open it, then open the folder "MacOS" and edit the file eclipse.ini which you will find inside. Change the line -Dosgi.requiredJavaVersion=1.7 to -Dosgi.requiredJavaVersion=1.6. Close and save, and now Eclipse will run in a minimum configuration. But you really want to install the 1.7 JDK.
For those using Mac OS X Mountain Lion (10.8)+. When you launch Eclipse for the first time, you may see the message "Eclipse can't be opened because it is from an unidentified developer."
To launch Eclipse for the first time, press the control key, click on the Eclipse icon, and select Open.
Eclipse is unable to open, have used eclipse before and has open before without a problem. Now I keep getting the following error message:
A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations:
Have gotten eclipse to open and work on projects before and won't open.
Here is a screen shot of what I keep getting:
You can explicitly tell Eclipse where to find it. Open eclipse.ini and add the following lines to the top of the file:
-vm
/absolute/path/to/jre6/bin
Update: I just nailed down the root cause on my own Windows machine. The GlassFish installer complained with exactly the same error message and after digging in GlassFish forums, the cause was clear: a corrupt JRE install on a Windows machine. My JRE came along with the JDK and the Java 6 JDK installer didn't install the JRE properly somehow. A DLL file was missing in JDK's JRE installation. After I reinstalled the standalone JRE from http://java.com, overwriting the old one, the GlassFish installer continued and also Eclipse was able to start flawlessly without those two lines in eclipse.ini.
I got this problem because i uninstalled the jdk version 13 and reinstall the jdk version 8
Even though i have updated the path variables eclipse still pick the old configuration.
You need to edit the eclipse.ini file which is in your folder where eclipse.exe is placed.
Just update this file with the latest path so eclipse can pick it up
It usually is because:
you indicated the wrong jvm path in your -vm argument: see this SO question for an concrete example.
the eclipse.ini got corrupted somehow (if it hasn't been modified, this isn't it, but if setting a jvm path doesn't work, ... I would replace the eclipse.ini by one coming from a fresh installation just to be sure)
the java which eclipse search by default is no longer accessible (because the $PATH is no longer up-to-date)
More details on the wiki page "Finding a VM, Using JNI Invocation or Executing Java"
No -vm specified
When no -vm is specified, the launcher looks for a virtual machine first in a jre directory in the root of eclipse and then on the search path.
If java is found in either location, then we look for a jvm shared library (jvm.dll on window, libjvm.so on *nix platforms) relative to that java executable.
If a jvm shared library is found we load it and use the JNI invocation api to start the vm.
If no jvm shared library is found, we exec the java launcher to start the vm in a new process.
As mentioned in "FAQ How do I run Eclipse?":
Eclipse DOES NOT consult the JAVA_HOME environment variable.
So I would check your $PATH, starting by n new shell sesion (whatever your OS is), typing 'java -version' to see if it still returns anything.
Copy javaw.exe from C:\Program Files\Java\jre1.8(or)1.6(or)1.7\bin
and paste it inside Eclipse folder
where eclipse.exe is there. That's all.
Here is how I fixed mine:
find the location where your jre is installed. in my case, it was located at C:\Program Files\Java\jdk1.7.0_10
copy the jre folder and paste it where your eclipse files are located (where eclipse.exe is located).
when you download eclipse, you get a .zip package containing eclipse.exe and all the other files needed to run eclipse but it is missing the jre files. so all you need to do is to find where jre folder is located on your hard drive and add it to the rest of the eclipse package.
I had the same problem and the issue was that I had a 32 bit version of Eclipse running on my 64 bit machine and it wanted the 32 bit version of JRE.
I changed Program Files to Program Files (x86) in the eclipse.ini file like so:
-VM
C:Program Files (x86)\Java\jre6\bin
and that solved the problem.
You may want to just install the 64 bit Eclipse, but this will take care of the error.
Did you install Java via the java.com web browser auto install? If so, then that's your problem! You need to to the "manual" install: http://www.java.com/en/download/manual.jsp
It's just a matter of having the correct match of 32-bit Eclipse/32-bit Java or 64-bit Eclipse/64-bit Java. Many 64-bit Windows have 32-bit browsers and the latter is the version of Java that the auto-installer will provide - not what the 64-bit Eclipse wants.
Make sure the install path of JDK is in your Path variable in Windows.
adding -vm C:/Program Files/Java/jdk1.6.0_29/bin/javaw.exe to the .ini file helped me.
Is so simple,only add your java path for example:
C:\Program Files\Java\jdk1.8.0_121\bin
in PATH system variable
I have faced the similar issue earlier with Eclipse and STS IDE'S
Please check weather JDK/JRE is available or not in your machine. If not please install JDK and setup the environment variables.
Even after step 1, if you are still facing the issue then it's time to set the vm argument in eclipse.ini or sts.ini in the following way.
-vm
C:Program Files (x86)\Java\jre8\bin
I also had same problem when developing android applications using eclipse IDE.
I solved it by removing all the java installations (I had java 6 and 7 both) and re-install only jdk 7.
I got this fixed by doing the below steps,
1)
The eclipse finds the JAVA executables from 'C:\ProgramData\Oracle\Java\javapath'
The folder structure will contain shortcuts to the below executables,
i. java.exe
ii. javaw.exe
iii. javaws.exe
For me the executable paths were pointing to my (ProgramFiles(x84)) folder location
I corrected it to Program Files path(64 bit) and the issue got resolved
Please find the screenshot for the same.
Just to add on top of other answers:
Windows Users: You can give the PATH to JRE in eclipse.ini separated by '/' or '\'. It doesn't matter. Eclipse will pick it anyway. For example, in my windows system, either of the paths is fine (after -vm of course):
C:/Program Files/Java/jre1.8.0_181/bin
or C:\Program Files\Java\jre1.8.0_181\bin
Change the vm value in eclipse.ini file with the correct path to your JDK something like this,
-vm /Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk/Contents/Home/bin
Path to eclipse.ini looks to me something like this,
/Users/tomcat/eclipse/jee-2018-09/Eclipse.app/Contents/Eclipse
This sometimes happen if you remove Java from your path variables.
To set the PATH variable again, add the full path of the jdk\bin directory to the PATH variable. Typically, the full path is:
C:\Program Files\Java\jdk-11\bin
To set the PATH variable on Microsoft Windows:
Select Control Panel and then System.
Click Advanced and then Environment Variables.
Add the location of the bin folder of the JDK installation to the
PATH variable in system variables.
I had this problem too on a win7 machine.
I wanted to update the jre with a jdk. So i deleted the jre folder and downloaded and unzipped the new jdk.
The issue was i manually deleted the jre folder, when instead i should've uninstalled it. This leaves a bunch of registry entries that still point to the old jre. Somehow eclipse still wants to use the old jre.
I couldn't uninstall the old java vm, i kept getting this error:
Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor
So i had to use this MS utility to fix the uninstall:
http://support.microsoft.com/kb/2438651/
Then i had to install again the vm. I installed to the same location the original one was at, to avoid losing another hour! After that eclipse started correctly.
Julio
I just had this problem and fixed it this way. I noticed the error message has jre in it not jre6 or jre7, so i copied jre6 from program files to eclipse folder then renamed it from jre6 to jre, then it worked :p
Newb move on my part, but I had installed just the JRE instead of JDK. Installed JDK and my problem went immediately away.
I had this problem and it was due to my windows machine playing up. I went into control panel -> system -> advanced - environment variables.
I edited the PATH variable (which was already correctly set up), changed NOTHING, clicked OK to come back out of the screens.
Then eclipse worked. No idea why, except because windows. Hopefully this may help someone.
I had this issue; I fixed it by going to
Computer-->Properties-->Advanced Settings-->Environmental Variables
In the System Variables find the variable named PATH.
-->Select Edit
-->At the very end of the Path Variable, put a ";" then add your path of your JDK and put \bin\ at the end
Should be fixed.
Example:
System Variable-
C:\Program Files (x86)\Common Files.......HP\LeanFT\bin
JDK path-
C:\Programs Files\Java\jre1.8.0_121
Final Path -
C:\Program Files (x86)\Common Files.......HP\LeanFT\bin;C:\Programs Files\Java\jre1.8.0_121\bin\
Sources:
https://www.java.com/en/download/help/path.xml
Its simple.
JDK bin directory or JRE bin directory should be in path variable
Example :
Java Installed directory:
Assume your java installed in 'C:\Program Files\java\Jdk1.8.0_144' directory
Now you can find bin directory in 'C:\Program Files\java\Jdk1.8.0_144\bin'
Navigate to user's environment variable
Control Panel --> User Accounts --> User Accounts --> Change my environment variables
In popup click Path under User variables for section
Click Edit... button and another popup will appear
Click New button and enter C:\Program Files\java\Jdk1.8.0_144\bin
Click OK button and again OK button in Environment variables popup.
Now you can open your eclipse without error
I found a solution wherein the Eclipse.ini the location was the old version of Java, and after updating the new version of java the location of
-vm
C:\Program Files\Java\jre1.8.0_201\bin
was same so I had to change the directory to my new version of Java.
So solution is to just open the most updated Java version and copying its directory path and replacing it in the Eclipse.ini file.
Moderately future proof example for Linux-like systems. Assuming javac installed and on your path.
./eclipse -vm dirname $(readlink -f $(which javac))
This will find the directory where javac is installed, and pass as vm argument to eclipse.
If on Linux (ex: Ubuntu 18), try installing (or reinstalling in your case?) default-jre, as follows:
sudo apt update
sudo apt install default-jre
I had the same error when just trying to run the Eclipse installer (./eclipse-inst) on a fresh Eclipse download just now, and the installer wouldn't even run! Installing default-jre solved it!
Source:
https://linux4one.com/how-to-install-eclipse-ide-on-ubuntu-18-04/
In my case I had edited the eclipse.ini for a different purpose to include -vm parameter. That was causing the failure. I removed the -vm and following line where I had included \bin and that fixed the problem.
I got ERROR:
RESOLUTION :
in file eclipse.ini at below location :
make change as :
-vm
C:/Program Files/Java/jdk1.8.0_251/jre/bin/server/jvm.dll
Restart eclipse and error will be resolved
C:\Program Files\Java\jre1.8.0_221\bin
worked for me