Oracle SQL Developer: Unable to find a JVM - java

I'm trying to open Oracle SQL Developer on my Windows7 64-bit.
When I tried to open SQL Developer it asked for java.exe path and I gave C:\Java\jdk1.6.0_34\jre\bin\java.exe
I got an error from Oracle SQL Developer saying: Unable to find a Java Virtual Machine. To point to a location of a JVM. Please refer to oracle9i jdeveloper install guide (jdev install.html)
Any clue on how to fix this?
Another Solution:
This worked for me several times. Install JDK7 and point to location of jdk7\jre\bin\java.exe

Probably this is you are looking for (from this post):
Oracle SQL developer is NOT support on 64 bits JDK. To solve it,
install a 32 bits / x86 JDK and update your SQL developer config file,
so that it points to the 32 bits JDK.
Fix it! Edit the “sqldeveloper.conf“, which can be found under
“{ORACLE_HOME}\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf“, make
sure “SetJavaHome” is point to your 32 bits JDK.
Update:
Based on #FGreg answer below, in the Sql Developer version 4.XXX you can do it in user-specific config file:
Go to Properties -> Help -> About
Add / Change SetJavaHome to your path (for example - C:\Program Files (x86)\Java\jdk1.7.0_03) - this will override the setting in sqldeveloper.conf
Update 2: Based on #krm answer below, if your SQL Developer and JDK "bits" versions are not same, you can try to set the value of SetJavaHome property in product.conf
SetJavaHome C:\Program Files\Java\jdk1.7.0_80
The product.conf file is in my case located in the following directory:
C:\Users\username\AppData\Roaming\sqldeveloper\1.0.0.0.0

I just installed SQL Developer 4.0.0.13 and the SetJavaHome can now be overridden by a user-specific configuration file (not sure if this is new to 4.0.0.13 or not).
The location of this user-specific configuration file can be seen in the user.conf property under 'Help -> About' on the 'Properties' tab. For example, mine was set to:
C:\Users\username\AppData\Roaming\sqldeveloper\1.0.0.0.0\product.conf
On Windows 7.
The first section of this file is used to set the JDK that SQLDeveloper should use:
#
# By default, the product launcher will search for a JDK to use, and if none
# can be found, it will ask for the location of a JDK and store its location
# in this file. If a particular JDK should be used instead, uncomment the
# line below and set the path to your preferred JDK.
#
SetJavaHome C:\Program Files (x86)\Java\jdk1.7.0_03
This setting overrides the setting in sqldeveloper.conf

The solution that worked for me:
If you have Sqldeveloper with java incorporated, you can use the \sqldeveloper\bin\sqldeveloper.bat to launch sqldeveloper as told here.

Version 1.5 is very, very old.
In the latest builds, we support 32 and 64 bit JDKs. In version 4.0, we find the JDK for you on Windows. If the software can't find it, it prompts for that path.
That path would look something like this
C:\Java\jdk1.7.0_45
You can read more about this here.

“C:\Users\admin\Downloads\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf” is misleading, it’s not the file which sets the Java Home variable. The actually file used is”%AppData%\sqldeveloper{PRODUCT_VERSION}\product.conf” [in my case it is "%AppData%\sqldeveloper\1.0.0.0.0\product.conf"]

The secret is you need to copy msvcr100.dll to the path where the installation says msvcr100.dll is missing (dialog box) and then try to install the sql developer.
For me I had to create bin folder in
C:\sqldeveloper\jdk\bin
and Copy msvcr100.dll to it.
If still not working! Try this!
You might also need to change the config file settings found in
C:\sqldeveloper\sqldeveloper\bin
Download and install 32 bit JDK (Windows) and set the path in config file as
SetJavaHome C:/Program Files (x86)/Java/jdk1.7.0_01

There is another route of failure, besides the version of Java you are running: You could be running out of Heap/RAM
If you had a once working version of SQLDeveloper, and you are starting to see the screenshot referenced in the original post, then you can try to adjust the amount of space SQLDeveloper requests when starting up.
Edit the file:
/ide/bin/ide.conf
Edit the line that specifies the max ram to use: AddVMOption -Xmx, reducing the size. For example I changed my file to have the following lines, which solved the issue.
#AddVMOption -Xmx640M # Original Value
AddVMOption -Xmx256M # New Value

If you have a 64-bit version of SQL Developer, but for some reason your default JDK is a 32-bit JDK (e.g. if you develop an Eclipse RCP application which requires a 32-bit JDK), then you have to set the value of the SetJavaHome property in the product.conf file to a 64-bit version of JDK in order to run the SQL Developer.
For example:
SetJavaHome C:\Program Files\Java\jdk1.7.0_80
The product.conf file is in my case located in the following directory:
C:\Users\username\AppData\Roaming\sqldeveloper\1.0.0.0.0
The solution described above worked in my case. The solutions of #evgenyl and #FGreg did not work in my case.

The Oracle SQL developer is not supported by the 64bit JDK.
To resolve this issue:
Install a 32bit JDK (x86)
Update your SQL developer config file (It should now point to the new 32bit JDK).
Edit the sqldeveloper.conf, which can be found under {ORACLE_HOME}\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
Make sure SetJavaHome is pointing to your 32bit JDK.
For example:
SetJavaHome C:\Program Files (x86) \Java\jdk1.6.0_13

This is known to happen even if there are some syntactical errors in your heap space setting in the sqldeveloper.conf.
If you have defined the heap space in any of the wrong ways mentioned here,
it still will show the same error when you launch it.
EDIT :
The correct way to set your heap size parameters would be something like this:
AddVMOption -XX:MaxPermSize=256M
AddVMOption -Xms256M
AddVMOption -Xmx768M

I also had the same problem after installing 32 bit version of java it solved.

Related

Java could not create virtual machine and other errors

My eclipse won't start since a few days. If I manage to get one error message at start to go away, it will be another new one, or another that I thought I'd already fixed. I do not know what exactly I've done so far, but I'll summarize as far as I remember. One thing you should know: it was very much.
I tried to:
1. Setting the -Xms[WXYZ] variable to another values, like 256M, 512M, 1024M and 2048M in the
- eclipse.ini
- environment variables
2. Added in eclipse.ini before -vmargs
- -vm [absolute path to my jdk\bin\javaw.exe]
- -vm [absolute path to my jre\bin\server\jvm.dll]
3. Changed environment variables
- I don't know anymore what I've done there
4. At some point I tried something with the JAVA_HOME environment variable, but it does not helped at all.
I think that I've done so far all of these imaginable combinations.
I've deleted eclipse and reinstalled JRE and JDK, I think I've got nothing left.
Here are all of this pictures on imgur itself (because I can't post images).
It were a great help if anyone could help me with that problem.
Edit: The current error message is:
Failed to create the Java Virtual Machine.
Edit 02: Changed system variable _JAVA_OPTIONS from value in picture to -Xms512M
Edit 03: If i start eclipse with
[path to eclipse]\eclipse -vm C:\Program Files\Java\jre1.8.0_202\bin\javaw.exe it stated that a runtime environment or development kit has to be available in order to run eclipse. It give me just C:\Program as location. However, if I take the absolute path and write it into the eclipse.ini, i get the same error message (Failed to create the Java Virtual Machine.)
if possible remove -vm P:\Programs\jdk1.6\bin line
more details in here Eclipse error: 'Failed to create the Java Virtual Machine'
Open the Control Panel
■ Go to System
■ Go to Advanced Systems Properties
■ Then Environment Variables
■ In System Variables, click Add
■ New Variable Name: _JAVA_OPTIONS
■ New Variable Value: -Xmx512M
■ Click OK
That's it, your Java program should now be able to execute properly.
For those interested, Java -Xmx/s is the configuration parameter that control the amount of memory Java uses.
■ Xmx sets the maximum heap memory size
■ Xms sets the minimum heap memory size
See http://www.jafaloo.com/2011/10/30/java-xmx-memory-settings/ for more details on Java Heap memory size and parameters.
I've done it.
The temporary newest Version of eclipse (2019-03) does NOT match with the newest Versions of JDK or JRE, as one of my lecturer told me.
So I head back to my favourite Version of eclipse; Luna. And I've got to delete all Java Version on my PC.
I have now Java 8 Update 202 on my PC. You can find it at this link, it is the jdk-8u201-windows-x64 (for Win10 64-bit) file.
JRE is included in this Version of Java.
Another zip`s of eclipse can be found at this link.
In my case, I had to configure the eclipse.ini file again:
C:\Program Files\Java\jdk1.8.0_201\jre\bin\server\jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.8
--add-modules=ALL-SYSTEM
I had to correct the -Dosgi.requiredJavaVersion=-Line and had to add the absolute path to my jvm.dll, as I had add the --add-modules=ALL-SYSTEM-line. I can't tell you if this is necessary.
You can check your Java Version via CMD-> java -version
Now I had to get to the system environment variables and had to change:
JAVA_OPTIONS to Value -Xms256m -Xms512m
JAVA_HOME to C:\Program Files\Java\jre1.8.0_202\bin
and had to add to the Path: C:\Program Files\Java\jdk1.8.0_201\bin and C:\Program Files\Java\jre1.8.0_202\bin
I could've set all [...]\jre1.8.0_202\bin[...] to [...]Java\jdk1.8.0_201\jre\bin, but I don't wanted anymore, I'm just happy to fixed it finally.
I had a similar problem on Windows 10. I upgraded my JDK to version 8 update 211 and added the following line to eclipse.ini just before the line containing -vmargs:
-vm
C:/Program Files/Java/jdk1.8.0_211/bin/javaw.exe
It resolved the problem. Please consider using forward slash i.e. / instead of backslash.

eclipse adt bundle installation [duplicate]

I just append
-vm
C:\Program Files\Java\jre6\bin\javaw.exe
in eclipse.ini then I try to start eclipse again and got this error. Give me how to solve or link that actually solve it.
this is my eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize 256m
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jre6\bin\javaw.exe
-vmargs
-Xms40m
-Xmx384m
Thank you
I had the same error when configuring eclipse.ini to use JRE6. Turns out I caused this error by incorrectly configuring eclipse to use the 64 bit JVM while running a 32 bit version of eclipse 3.7.
The correct configuration required the eclipse.ini -vm argumument to use "C:/Program Files (x86)/" instead of "C:/Program Files/".
Make sure that the JVM version (32/64 bit) you use matches the eclipse version (32/64 bit).
It may just be the way the error shows (and not how it is written in the eclipse.ini file), but there is text in Eclipse.ini (Specifying the JVM) that says the following:
The -vm option and its value (the path) must be on separate lines.
The value must be the full absolute path to the Java executable, not just to the Java home directory.
The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM
Look at the second line of the message box. There you can see which java runtime in fact is started. Mine was suddenly C:\ProgramData\Oracle\Java\javapath\javaw.exe. This happened after I have installed a "chrome java updater" (Chrome browser moaned: 'your java is outdated, you have to update...').
Before this "chrome java update" my eclipse (luna jee x64) started without error. Looking closer to the background I detected following: the chrome java updater (notabene started from an Oracle site) added C:\ProgramData\Oracle\Java\javapath in front of the env var PATH. It contains three symbolic links to the newest java 8 JRE installation in (x86) program folder -> hence to a 32 bit java JRE. Oracle replaces with Java8 the old technique having the symlinks in system32 (64bit) resp. SysWOW64 (32bit).
Meanwhile I learned. Whatever java installer you have executed last (the *.exe) leads windows to remember that java flavour (32b or 64b), with the result that after an update the links in C:\ProgramData\Oracle\Java\javapath point to a java installation of the remembered flavour. If you have a 64b eclipse installation and encounter the described error: just re-install the newest 64b JDK. After that the java updates do no more link to a 32b version. And eclipse 64b will start correctly without the entry in eclipse.ini .
You need to check if your PC has a 64-bit or 32-bit operating system, then same goes for your JDK (64-bit/32-bit) and also for Eclipse (64-bit/32-bit).
Make sure they are all the same; if not, you need to download the one that matches your bitness.
For Eclipse:
Added this two lines in eclipse.ini
Second line represents the JDK location of the javaw.exe file.
-vm
C:\Program Files\Java\jdk1.7.0_60\bin\javaw.exe
Note: place -vm lines before -vmargs, otherwise default location is taken.
For STS
Change the same as above in STS.ini
I just hit this too. Turns out that at least for me, this was due to trying to use a win64 version of the JRE with a win32 Eclipse. I seems that win32 Eclipse requires a win32 Java (what is called -586 in the list of Java installers from Oracle/Sun).
The reason I was using both is that I was trying to pinpoint a bug that only manifested itself in 64-bit Eclipse, so I needed a 32-bit to compare to.
Once I installed BOTH the "x64" (win64) and "i586" (win32) versions of the JRE on my machine, things work fine and no error 13. You can apparently have both installed at the same time.
The error means it's the wrong JVM version for that version of Eclipse. The link has more details:
http://www.ehow.com/how_4784069_terminated-exit-code-error-eclipse.html
Make sure the Eclipse and the Java that you are using are both either 32-bit or 64-bit.
You cannot run 64-bit eclipse with 32-bit JRE.
java -version
Java HotSpot(TM) 64-Bit Server VM
The 32 bit version JRE will not have 64-Bit in it.
I just had the same issue, and spend about an hour trying to solve the problem.
In the end it was a '#' character in the path.
So I renamed "C:\# IDE\eclipse 3.7\" to "C:\+ IDE\eclipse 3.7\" and that solved the problem.
Recently I faced same issue.My version of eclipse didnt support java version 8.
I had accidently installed jre 8 on my machine which automatically updated my PATH variable by appending "C:\ProgramData\Oracle\Java\javapath" in the beginging which led eclipse to pick up this version(and ignore the manually added 1.6 version which came later in order)and crash with exit code 13.
I just removed this string from the path so which led system to pick up my older version and eclipse started just fine.
I had the same issue with eclipse in my both machine. I had jre 32 bit installed. So I removed 32 bit and installed 64 bit instead and it worked perfectly.
simply install 64 bit version of JAVA from http://java.com/en/download/manual.jsp
and uninstall older version if prompted by the 64 bit installer
Go to the folder where you saved Eclipse. Look in the configuration folder at the startup log. It will give you a much better diagnostic than "exit code 13".
After java update, eclipse will not start because default jdk location has changed. Adding the following lines to eclipse.ini file solved my problem immediately:
-vm
C:\Program Files (x86)\Java\jdk1.7.0_75\bin\javaw.exe
I added these lines just before vmargs. It looks like as the following :
...
--launcher.defaultAction
openFile
-vm
C:\Program Files (x86)\Java\jdk1.7.0_75\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m
For more information on eclipse.ini, visit this the site http://wiki.eclipse.org/Eclipse.ini#-vm_value:_Windows_Example
In my case, i use 32 bit eclipse and java. If you installed both 32 bit and 64 bit versions of java, be careful to choose the right version. For 64 bit versions, refer to the javaw.exe file under the directory
C:\Program Files\Java\jdk1.8.0_60\bin
Whenever you see this error, go to Configuration directory and check for a log file generated just now. It should have proper Exception stacktrace. Mine was a case where I got an updated 32-bit JRE (or JVM) installed which was the default Java that got added to the Path. And my Eclipse installation was 64-bit which meant it needed a 64-bit VM to run its native SWT libraries. So I simply uninstalled the 32-bit JVM and replaced it with a 64-bit JVM.
I wonder if they will improve this reporting mechanism, instead of silently generating a log file in some directory.
This error occurred to me on ubuntu, having installed 32bit and 64bit java. Use
sudo update-alternatives --config java
to set the right version to use as default.
Just uninstalled jre-32 bit version and It worked fine for me.
I was using Eclipse Juno and I didn't remember if it was 32 or 64 bits. I installed Java 32 bits and that's why it failed. I then installed Java 64 bits and Eclipse Juno is working again.
I also removed any java or jre reference in my environment variables (PATH).
In my opinion the most answers here regarding different architectures of Eclipse and Java are simply wrong and this can be easily checked using e.g. Process Monitor under Windows. The -vm option is there to run a specific version of java and the point of it is, that the configured process is started and runs all the Java code on its own, that's why you configure up to java.exe. In that case you DON'T need to have the same architecture for Eclipse and Java, but can happily mix both 32 Bit and 64 Bit. You only CAN'T mix both, if you DON'T use -vm, but let Eclipse load Java natively into its own process using jvm.dll and such. That latter behavior is Eclipse's default, but not the case anymore if you properly configure -vm in eclipse.ini.
If you don't believe me, do some tests on your own using different architectures of Eclipse and Java and do configure -vm or not properly. In the end, that's exactly what the questioner described in his comment to the accepted answer:
Cannot run Eclipse; JVM terminated. Exit code=13
He is telling that a 64 Bit JDK is working now, but in his screenshot one can see that his Eclipse is 32 Bit, because the path for launcher.library is 32 Bit.
And now for the reason I came here: Ony of my customers had some problems loading one of our Eclipse/OSGI based applications as well and Java exited with exit code 13. In the end it showed that the problem was not about -vm or the architectures of Java and eclipse.exe, but instead he was simply missing config.ini and I guess eclipse.exe wasn't aware what to load or such. After we recognized that and put a config.iniback in place, the app loaded fine with using -vm and a 64 Bit JRE7 in combination with a 32 Bit eclipse.exe.
I had the same issue on Ubuntu, and solved it by unpack all *.pack files in jdk directory.
for example:
cd /usr/java/jdk1.7.0_03/jre/lib
sudo ../bin/unpack200 rt.pack rt.jar
use the configuration below;
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130807-1835
-product
org.springsource.ggts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-vm
C:\Program Files\Java\jdk1.7.0_51\jre\bin\javaw.exe
-vmargs
-Dorg.eclipse.swt.browser.IEVersion=10001
-Dgrails.console.enable.interactive=false
-Dgrails.console.enable.terminal=false
-Djline.terminal=jline.UnsupportedTerminal
-Dgrails.console.class=grails.build.logging.GrailsEclipseConsole
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m
-XX:MaxPermSize=256m
-Dorg.eclipse.swt.browser.IEVersion=10001
I fixed it reinstalling the jdk. In my case it was necessary to do:
java -version
sudo apt-get purge openjdk*
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
java -version
javac -version
taken from Install Java JDK+JRE (oracle) in Kubuntu 13.04 from apt
In my case JAVA path was not set in Env variables. Started to work after correct path was set in Env PATH.
Type javac in command prompt and make sure JAVA PATH is correct.
I did couple of things inorder to get rid of this annoying error as modifying .ini never worked for me.
Installed latest JDK
Delete old eclipse IDE folder completely.
This time i Unziped to different location
Double Click "eclipse.exe" Works now like charm
Use default workspace to load your old projects.
Am suspecting it to be JDK's Java VM issue more than eclipse.
I used the new Eclipse Installer. I didn't like the installation path and I changed it manually. After that, I got the exit code=13 message too.
There is a new property in the eclipse.ini file named -install. I just had to modify it with the new location, and that solved this issue.
In the new installer I selected D:/eclipse, but the IDE was installed at D:/eclipse/eclipse. So, I moved the folder manually. The next time I tried to open eclipse I got the exit error. Thus, I had to modify eclipse.ini and set the current location:
-install
D:/eclipse
Before going to the solution, let us know why it is showing that error. If you know the problem behind this issue we can easily fix that error.
Reason 1: The most common reason behind this problem is, we are trying to install different bit version-that is, 64 bit or 32 bit version of the software. It maybe either Eclipse or Java.
Solution:
Check which version of operating system you are running.make sure you downloaded the same version of Eclipse as well as same version of Java software.
Reason 2: Configuration mistake in Eclipse.ini file
Solution:
Add this line "-vm then path of your java sdk" at the end of Eclipse.ini file. for example:
-vm
C:\Program Files\Java\jdk1.7.0_71\bin\javaw.exe
Reason 3: Special characters ( #, !, #) in Eclipse installation directory.
Solution:
Make sure you don’t have any special characters.
Reason 4: You have added JAVA path two times in PATH system variable and both the path are different.
Solution:
Remove one incorrect/different JAVA path from PATH system variable.
Reason 5: You maybe using latest version of Eclipse, but you might be using wrong version or unsupported version of Java Virtual Machine (JVM).
Solution:
To check which version of java you are using open command prompt by pressing win+R key and type cmd and press enter. Now in that console type Java -version command to know java version.
Now research whether eclipse support that version or not.
Or
You can open “readme” folder in Eclipse folder and open readme_eclipse.html to see which version it supports.
for ones with Eclipse Neon
I wanted to run Eclipse Neon and had JRE 1.8 but JDK 1.7
It returned error=13
then I installed java JDK 1.8 and everything worked like a charm
I had this issue also. I had an old JDK1.8.0_05. I installed the newest JDK1.8.0_111 and everything works great now. Just be sure to update your environment variable.
I am on Windows 7 64 bit.
Using Eclipse Neon 1a.
Hope that helps someone.
I face same issue with sts 3.8.4, so I tried different settings but not luck,
I reinstall jdk again n tried but same problem.
Finally I downloaded sts 3.8.2 n it runs with out any issue.
Using windows 8, 64 bit os.
thanks
This can happen when the PATH environment variable is point to a wrong java instalation.

Windows error 2 occured while loading the Java VM

I've been trying to install this ARToolkit from Qualcomm:
https://ar.qualcomm.at/qdevnet/
(Windows ".exe" version) on a Windows 7 64bits platform, and I keep getting the error:
Windows error 2 occured while loading the Java VM
The program trying to install this program is InstallAnywhere, but I can't seem to find any documentation about this error. The dialogue box name when the crash happens is
LaunchAnywhere
I was just wondering if anyone had seen this kind of error before and if so, how to solve it. The very few answers I can find online relate to Win98/ME issues thus making them irrelevant.
I'm currently using JDK 1.7.0_04 and jre 1.7 if this is somehow relevant.
Launch the installer with the following command line parameters:
LAX_VM
For example:
InstallXYZ.exe LAX_VM "C:\Program Files (x86)\Java\jre6\bin\java.exe"
In cmd
C:\Users\Downloads>install.exe LAX_VM "C:\Program Files\Java\jdk1.8.0_60\bin\java.exe"
For me it works a deleting "C:\ProgramData\Oracle\Java\javapath" in my system enviroment PATH variable
Edit:
If you don't have that variable or it does not work you can directly delete or rename the directory "C:\ProgramData\Oracle\Java\javapath"
'Windows error 2' has dozens of meanings (52 that I could find).
The most common one is ERROR_FILE_NOT_FOUND, which can be found in winerror.h. Without more context, that's the best I can guess. Did you check the event logs to see if there's more information there?
We could not uninstall a program, stuck with the "Windows error 2 cannot load Java VM". Added the Java path to the PATH variable, uninstalled and re-installed Java 8, the problem would not go away.
Then I found this solution online and it worked for us on the first shot:
- Uninstall Java 8
- Install Java 6
Whatever the reason, with Java 6, the error went away, we uninstalled the program, and re-installed Java 8.
If you get the error after installation:
Find the .lax file with the matching exe name and update current vm path from:
lax.nl.current.vm=C:\ProgramData\Oracle\Java\javapath\java.exe
to
lax.nl.current.vm=C:\Program Files\Java\jre1.8.0_144\bin\java.exe
Try adding C:\path\to\java\jre\bin to your system environment variable PATH and run again. That worked for me!
I think it should be .....\javaw.exe". It worked for me. Thanks.
I had same mistake, it was produced because i had disabled the creation of "_jvm" in the InstallAnywhere (project - JVM settings - Installer Settings - Bundled/Downloaded Virtual Machine), then into file "Uninstall $PRODUCT_NAME$.lax" into uninstall folder, the variable "lax.nl.current.vm" is empty.
If you don't need jvm is disabled check "Install Bundled / Downloaded Virtual Machine" option in the checkbox (project - JVM settings - Installer Settings - Bundled/Downloaded Virtual Machine).
If you need jvm is disabled because you create it manually, then you can do the following:
create an action "Modify Text File" to append variable with the value of the _jvm folder.
(Existing File)
$USER_INSTALL_DIR$\Uninstall_$PRODUCT_NAME$ \Uninstall $PRODUCT_NAME$.lax
(Append)
lax.nl.current.vm=..\_jvm\bin\java.exe
I got the same problem after upgrading java from 1.8.0_202 to 1.8.0_211
Problem:
Here are directories where new version of 1.8.0_211 of Java installed:
Directory of c:\Program Files\Java\jre1.8.0_211\bin
Directory of c:\Program Files (x86)\Common Files\Oracle\Java\javapath
So one is located in 32 bit and second is in 64 bit Program files folder. The one that is specified in the PATH is 32 bit version (c:\Program Files (x86)\Common Files\Oracle\Java\javapath), even though it was 64 bit version of the Java that was installed.
Solution:
Change system environments variable PATH from c:\Program Files
(x86)\Common Files\Oracle\Java\javapath to c:\Program
Files\Java\jre1.8.0_211\bin

Java Error opening registry key

I get this error when I try to do anything with Java in command prompt:
Error opening registry key 'Software\JavaSoft\Java Runtime Environment.3'
Error: could not find Java.dll
Error: could not find Java 2 Runtime Environment
I did screw around with deleting Java directories and registry a few days ago. I restarted computer and java was still working fine, then i restarted it again today and now I get this error. I have tried uninstalling and reinstalling but that doesn't seem to work. I have the latest java JRE installed and the path set in the environment variables. Anyone have any clue how to fix this?
Make sure you remove any java.exe, javaw.exe and javaws.exe from your Windows\System32 folder and if you have an x64 system (Win 7 64 bits) also do the same under Windows\SysWOW64.
If you can't find them at these locations, try deleting them from C:\ProgramData\Oracle\Java\javapath.
You will find a folder named "Oracle" on ProgramData folder in your windows installed drive. Remove the folder. Hope it will work.
In my case my install drive is C and my path is C:\ProgramData\Oracle
I had a similar problem. I had installed JDK7 update 1 but couldn't use it (probably because I found a JRE6 that I deleted after installing JDK7). Uninstalling JDK7 was impossible. The solution was to add the JRE registry entries by hand.
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment]
"CurrentVersion"="1.7"
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.7]
"JavaHome"="C:\\Program Files\\Java\\jre7"
"RuntimeLib"="C:\\Program Files\\Java\\jre7\\bin\\client\\jvm.dll"
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.7.0_01]
"JavaHome"="C:\\Program Files\\Java\\jre7"
"RuntimeLib"="C:\\Program Files\\Java\\jre7\\bin\\client\\jvm.dll"
You'll have to adjust the above to your own directories and version.
If this doesn't help, there's still JavaRa https://singularlabs.com/software/javara/ .
Delete these 3 files present in your local at path C:\ProgramData\Oracle\Java\javapath
java.exe
javaw.exe
javaws.exe
This solved the issue for me :)
Make sure you remove any java.exe, javaw.exe and javaws.exe from your system.
if you have an x32 system (Win XP 32 bits) Windows\System32 folder
if you have an x64 system (Win 7 64 bits) also do the same under Windows\SysWOW64 folder
On Windows 10 I had just installed the JDK, and got these errors when checking the version. I had to delete all executable files starting with java (i.e. java.exe, javaw.exe and javaws.exe) from C:\ProgramData\Oracle\Java\javapath. And then, once deleted, re-run the JDK installer, restart my terminal program and java -v works.
There are 3 locations to check
Registry HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.8.0_xxx\JavaHome
Java Control Panel- Java tab - View - Path
Environment Variables - Path ($env:Path)
All 3 have to align (if you have multiple entires just remove the wrong ones) - thats all
I had the same:
Error opening registry key 'Software\JavaSoft\Java Runtime Environment
Clearing Windows\SysWOW64 doesn't help for Win7
In my case it installing JDK8 offline helped (from link)
I would have tagged this as a comment but cant (dont have the rep) just wanted to thank Tilman. I was trying to get PDFsam (PDF Split and Merge) to work to no avail.
At launch it would produce an error stating that it could not find JRE 1.6.0. I Have both 32 and 64 bit versions and they check out fine at the java website in their respective browsers.
Tried uninstalling/reinstalling and rebooting repeatedly as well as using JavaRa. No such luck, still no go.
I looked in the registry after reading this post and there was no ...\SOFTWARE\JavaSoft\ key so I added each with their respective string values pointing to my x86 version (PDFsam is a 32bit program). This got past the first problem but an error popped up about amd64 libraries suggesting the machine wanted to run the 64bit version. So I changed the paths to the 64bit JRE and PDFsam now works.
FYI - I got here by searching for Java registry keys after I was unable to launch javaw.exe from command prompt (even after adding the requisite paths to system path), making the aforementioned changes solved this as well.
I got this kind of error whe nI had JDK 1.7 before and I installed JAVA JDK 1.8 and pointed my JAVA_HOME and PATH variables to JAVA 1.8 version. When I try to find the java version I got this error. I restarted my machine, and it works . It seems to be we have to restart the machine after modifying the environment variables.
In case a virus scanner (like McAfee) is running, try:
Disable virus scanner
Uninstall Java (via Control Panel / Programs and Features)
Reinstall Java (from Java.com)
Re-enable virus scanner
Uninstall Java (via Control Panel / Programs and Features)
Install Java JRE 7 --> OFFLINE <--
Configure JAVA_HOME and Path = %JAVA_HOME%/bin;%PATH%
I have Windows 7. I got the same problem after installing: PyCharm.
I wasn't satisfied with PyCharm, so I decided to use Eclipse instead. This is when I discovered that things went wrong with my JDK. I used to have Java.9.x. So I decided to uninstall it and get the newer version (at my time it was Java.11.x. The same problem persisted.
I followed most of the steps mentioned above in the post like:
- Removing all java*.exe files,
- removing Java related entries from the registry.
- Cleaning-up all unnecessary Java folders. However nothing helped. I still had something in the system referring to a broken Java pathname.
What really brought remedy is the following:
- Uninstalled what ever version of JDK I had at the moment.
- Re-Installed the last JDK version I had before the problem took place
- Properly uninstall that version.
- Install whatever latest version of SDK. ..
That's it .. at this point everything returned to normal ... Except that Java.11.xx did not fix the system path automatically, I had to do it manually.
I followed multiple answers from above and got my issue resolved.
Issue:
Javac was on 13 from jdk but java was using 1.8 from jre so java threw incompatible runtime error
Fix:
Under Control Panel -> Programs: I uninstalled 1.8 (named Java 8 runtime) and DID NOT touch the other one (named Java (TM) SE Development Kit 13)
Deleted java.exe, javac.exe and javawc.exe files from:
a. C:\Windows\system32
b. C:\Windows\SysWOW64
c. C:\ProgramData\Oracle\Java\javapath
The environment variable JDK_HOME was pointing to 13 but JAVA_HOME was pointing to 1.8 so i pointed JAVA_HOME to also use 13 which was C:\Program Files\Java\jdk-13.0.1
There was a Path variable under both User variables and system variables sections.
For the one in user variables section, i added the string %JDK_HOME% - which translated automatically to the physical path.
For the one under system variables, I deleted the path C:\ProgramData\Oracle\Java\javapath and added C:\Program Files\Java\jdk-13.0.1\bin
All good now! Thanks to all the people who answered, you rock!
Make sure to delete java references from system32, SysWOW64, and delete javapath from ProgramData\Oracle\Java. It solves the issue
If you have "C:\ProgramData\Oracle\Java\javapath" in your PATH, just make sure that the java bin path entries are present before this entry in your PATH.
I was facing the exact same issue, and I just moved the java jdk/jre bin path entries up in the list, above the oracle entry and it resolved my issue.

A JRE or JDK must be available in order to run Eclipse. No JVM was found after searching the following locations

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

Categories

Resources