I downloaded this "https://www.oracle.com/java/technologies/javase-jdk11-downloads.html#license-lightbox" Java JDK and installed it.
But when I go to the command prompt to check the version, it says
Error: could not open 'C:\Program Files\Java\jre1.8.0_241\lib\amd64\jvm.cfg'
Can someone solve my problem?
Simply uninstall the java version from the control panel and it will work.
To resolve the issue of C:\Program Files\Java\jre8\lib\amd64\jvm.cfg do the following steps and re-run the cmd :
1) Go to C:\Windows\System32
2) Search for Java in that folder
3) Remove java.exe, javaws.exe and javaw.exe from this folder
4) Open command prompt.
5) Type Java it should work.
->Firstly uninstall Java(any version) here it is 1.8
->Then Goto->environment variable-> Check the java path which is appended[in my case a default java was installed] i had to remove it
->Now install java 1.8
->then set the java path for the "PATH" variable = %JAVA_HOME%\bin
JAVA_HOME = C:\Program Files\Java\jdk1.8.0_111
->Open Command prompt and give java -version to verify the installation.
Only Windows OS problem. Remove from system32 you kept trash in other locations where java has installed (updates example). Just reinstall java will help. Situation to gain that error may be different (my situation when java location was different than java update I installed long ago). Add/remove java solved problem.
Related
My Talend tool version is 5.6. As mentioned in Talend documentation it needs Java Runtime Environment 7 i.e jdk1.7, which is installed - along with set java_home in my environment variables. As per me it should work.
However I have jdk1.8 installed too, but I'm correctly pointing jdk1.7 path at environment variable.
Alternatively I have tried giving jdk1.7 path in Talend's Talend-Studio-win-x86_64.ini file. It's still giving me error.
Below is snapshot: in cmd the installed version shows jdk1.8 where in echo %JAVA_HOME% it shows path of jdk1.7
While starting tool this error comes:
Create a batch file with the following command:
Talend-Studio-win-x86_64.exe -vm "[jdk path]\bin"
Then start the studio by executing this batch.
Talend is based on eclipse, so you can set the java vm to use in the ini-file. (Sorry, I don't have an installation here right now, I think it is called talend.ini - nevertheless, it is located in talend's installation folder.)
Add the following to the top of the file:
-vm
[path to your java 7]/bin/javaw.exe
try to make changes in TOS_DI-win-x86_64.ini file
add line
-vm
C:\Program Files\Java\jdk-11.0.14\bin\javaw.exe
And update or confirm the version as below.
-Dosgi.requiredJavaVersion=11.0.14
Hope it'll help to fix the issue
Suppose you have talend in c:\talend and jdk1.7 is in C:\jdk1.7.
You can do like the following in windows environment.
Open command prompt.
Goto the bin folder location where jdk 1.7 is located. For example if you have jdk in C:\jdk1.7 then
cd\
cd C:\jdk1.7\bin
Then from bin folder of jdk type the full uri of the executable and hit enter.
In the above supposition c:\jdk1.7\bin>c:\talend\tos_di-xxxxx.exe
In the above statement tos_di-xxxxx.exe is the executable file depending on the os environment
why do I get this? How can I fix it?
C:\Users\ash>java version
Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'
has value '1.7.0_01', but '1.7' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
The accepted solution for Reinstalling ALL JDKs was a bit harsh.
I too experienced this problem and here is my 2 cents:
This problem started happening since I installed JDK 8 and still had JDK 6 installed. I need for different projects I'm working on.
I noticed I had both a User and a System %JAVA_HOME%, so I removed my User %JAVA_HOME% variable and left only the system one.
I also noticed that in my Oracle installation there was some Java executables and I believe those where the ones conflicting since both my Oracle and Java installations were in my %PATH% variable.
I removed all Java paths from my %PATH% Variable and only left the %JAVA_HOME%\bin at the start of the variable for avoiding any conflicts with the Oracle installation.
I had a similar issue after installing the java 1.8.
To fix this go to Advance System setting --> path and remove
C:\ProgramData\Oracle\Java\javapath;
Removing
C:\ProgramData\Oracle\Java\javapath;
work like charm
Reinstall JDK and set system variable JAVA_HOME on your JDK. (e.g. C:\tools\jdk7)
And add JAVA_HOME variable to your PATH system variable
Type in command line
echo %JAVA_HOME%
and
java -version
To verify whether your installation was done successfully.
I had a similar issue after installing the java 10.0
To fix this go to Advance System setting --> path and remove
C:\ProgramData\Oracle\Java\javapath;
I had to remove the Common Files javapath from the 'Path' that was conflicting, in order to make it work. Now thankfully the java -version works just fine.
C:\Program Files (x86)\Common Files\Oracle\Java\javapath
Make sure your JDK Path variable is directing to the \bin folder and is at the top of the list, because it always uses the first match. By moving it to the top you can make sure that no other path is matched first.
If there's any other entry that has a file called java (such as C:\ProgramData\Oracle\Java\javapath) it will run the command against that file instead of the java file in your JDK. There's no need to reinstall the entire JDK unless your files are corrupt or damaged for some reason.
This problem generally occurs in Windows when your "Java Runtime Environment" registry entry is missing or mismatched with the installed JDK. The mismatch can be due to multiple JDKs.
Steps to resolve:
Open the Run window:
Press windows+R
Open registry window:
Type regedit and enter.
Go to: \HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\
If Java Runtime Environment is not present inside JavaSoft, then create a new Key and give the name Java Runtime Environment.
For Java Runtime Environment create "CurrentVersion" String Key and give appropriate version as value:
Create a new subkey of 1.8.
For 1.8 create a String Key with name JavaHome with the value of JRE home:
Ref: https://mybindirectory.blogspot.com/2019/05/error-could-not-find-javadll.html
I edited my path to put the Oracle JDK at the start of the path and that fixed it.
Problem:
We had the same problem in our Windows 2012 server. We used JAVA_HOME environmental system variable, an we used in the PATH this kind of settings: ...%JAVA_HOME%/bin;...
and no other java related settings was in the PATH.
The problem was we had a space at the end of the value of the JAVA_HOME variable. Like 'C:\Program Files\Java\Jdk 1.8.0_172 ' so the %JAVA_HOME%/bin meant 'C:\Program Files\Java\Jdk 1.8.0_172 \bin'. So because the value was split by space and the system tried to find java.exe at 'C:\Program Files\Java\Jdk 1.8.0_172' where it is obviously not.
Solution was: Delete the space from the end of value of the JAVA_HOME !
Uninstall Java from machine
Check Java folder is deleted from Program Files
Check Registry does not have any instance of Java
Open system Variables and delete the ONLY java path from PATH
Now install the new version again.
Set the Path in System Variables.
This process cleans up all the traces of java and then install fresh java.
Note: This issues occurs when there is multiple installation and uninstall done.
You could be using a 32 bit version of java on a 64 bit environment.
Export the registry hive form HKLM\Software\JavaSoft and import into HKLM\Software\Wow6432Node\JavaSoft. For 1.6 I only needed JavaHome and RuntimeLib values.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Javasoft]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Javasoft\Java Runtime Environment]
"CurrentVersion"="1.6"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Javasoft\Java Runtime Environment\1.6]
"JavaHome"="C:\\Java\\jre"
"RuntimeLib"="C:\\Java\\jre\\bin\\client\\jvm.dll"
None of the above worked for me, unfortunately.
The error solved when I uninstalled the old JDK versions that were installed on my computer. I did it simply with the "Uninstall or change a program" tool (under the Control Panel).
I removed the "C:\Program Files (x86)\Heroku\bin" from PATH variable and the problem has gone. I think it is probably the Heroku require different version of Java. So check all directories in your PATH variable, remove the possible ones may have confliction.
If you face this error in cmd with another error as "could not find runtime environment" after you have done all settings in Environment Variable. Then you just need to run jre.exe in your jdk folder and reinstall it and then recheck it by java -version command. Hope it will help you.
rename file "C:\Windows\System32\java.exe" to "C:\Windows\System32\java_old.exe"
CMD --> java -version
done.
In my case the regedit information was correct and the problem was solved by doing the below:
1) setting JAVA_HOME to jdk - set JAVA_HOME=C:\Program Files\Java\\bin
2) setting PATH to jre - set PATH="C:\Program Files\Java\\bin"
after adding the requirements path as illustrated up and deleting C:\ProgramData\Oracle\Java\javapath;. don't forget to reopen your editor.
Go to CMD and type the following:
SET PATH=C:\Program Files\Java\jdk1.8.0_291\bin
(here jdk1.8.0_291 represents your java version, it may differ for you)
I am trying to install tizen wearable sdk in windows 7 64bit. I have donwload the .exe however when I am trying to isntall it I am getting the following error:
error - Cannot execute Java even if it was installed. Check environment variable or Java version(over 1.6) please.
I have installed in my computer java 1.7.0_80. I have put to the path of the system C:\Program Files\Java\jre7\bin and in JAVA_HOME C:\Program Files\Java\jdk1.7.0_80
I have tried to follow the instructions from here here however I didn't mange to solve my issues.
EDIT: I followed the instructions from that link I went to cd\Users\AppData\Local\Temp and I run from there the command in console java -jar installmanager.jar. THe installation began normally. However, during the installation I got several errors.
I've had a few problems with the Tizen Wearable install too.
You can either make sure that you have Java in your path by going to a command prompt and typing java -version for example. If it works then Java is in your path. If it doesn't you have to fix it:
Win+Pause/SysRq then click on Advanced System Settings
Click on environment variables
Look for PATH and edit it
Add the path to your Java install (eg: C:\Program Files (x86)\Java\jre1.8.0_31)
Or run from the command line:
Go to a command line
cd to %TEMP%
Run Java by first entering the path to your java version (eg C:\Program Files (x86)\Java\jre1.8.0_31) then bin\java, so C:\Program Files (x86)\Java\jre1.8.0_31\bin\java.exe
If you are still having problems then edit the question to add more specific information so any other issues can be fixed.
Try to check if this directory is in the path too:
C:\ProgramData\Oracle\Java\javapath
and if there is links to missing java executables.
If this is the case, you can remove that folder to the path, replacing with the current java version you want, or fix the link from there.
It seems like the VBS script tried to delete a file that doesn't exist, you can go to the VBS file and go to the problem line, and check out which file was missing. Then decide what to do.
Maybe you should install the latest JDK, try the latest JDK and see if the problem can be solved.
I installed eclipse and netbeans on mac osx 10.6
I installed android sdk and everything was working perfectly.
Now I installed mac ports
and installed ImageMagick using macports
Now after restarting the system neither netbeans work nor eclipse.
Net beans closes without any error. and eclipse give following error :
A JDK or JRE must be installed in
order to run eclipse No java virtual
machine is found after searching the
following location:
/Users....../eclipse.app
ContentsMacOS/jre/bin/java java in you
current PATH
I thought the problem might be with the path.
So I tried running java and javac from terminal. But these two commands run properly.
note: I don't have javaw (I am not sure whether we have this file in mac or not.
Can I know what can be the problem and how can I fix it ?
In the Eclipse.app/Contents/MacOS/eclipse.ini file put
-vm
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/java
right before
-vmargs
should help, I hope ... I hope
Check your Eclipse directory -- and look in eclipse.ini for this line:
-vm
<path to java.exe - e.g. C:/Program Files (x86)/Java/jdk1.6.0_18/bin/javaw.exe>
You're probably missing that
For newer versions: Mac OS X El Capitan Version 10.11.6 path to current Java version is:
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
For Eclipse Neon.1 open the eclipse.ini file from
Eclipse.app/Contents/Eclipse/eclipse.ini
and update the vm argument to:
-vm
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
just before
-vmargs
For me updating the eclipse.ini with -vm did not help. Rather, I had to update Eclipse.app/Contents/info.plist with below content(replace $Actual Java location$ with location of java:
<string>-vm</string><string>*$Actual Java location$*</string>
For windows 7 - 64 bit users ( may work for others too )
you may do the following
1. If the java Runtime is NOT already installed, (Note it does not get installed along with Android SDK, you need to download it separately ). You can download from here http://www.oracle.com/technetwork/java/javase/downloads/index.html (select 'Java Platform (JDK) 7u21' out of the three option the first button :) )
after install you will find javaw.exe in " C:\Program Files (x86)\Java\jre6\bin"
2. set the environment variable the steps as below
a) Right click Computer, select properties, select 'advance system setting'
b) Under Advanced tab select the last button 'Environment Variable'
c) Under System settings in the window that comes next search for 'Path'
d) select 'Path' click edit
e) Add the '; C:\Program Files (x86)\Java\jre6\bin' (this path or which ever path its installed in your machine, semi colon is used to separate other pre-existing path variables, and no need of quote ;) )
Thats all !! Now try running Eclipse.exe ( note : if you have added the entry in eclipse.ini as suggested by some ..please remove it else it will throw another exception)
Remember no need to change the eclipse.ini
It works Just double click the eclipse.exe :)
OK. So I did add
`-vm
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/java`
to eclipse.ini file but it was always overwritten when I restarted the Eclipse.
So, the thing I have done is:
I've created the folder structure mkdir -p jre/Contents/Home/jre/bin/ in main eclipse folder
Changed dir to: cd jre/Contents/Home/jre/bin/
Made symlink to $JAVA_HOME/bin/java folder: ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java
And after that Eclipse works every time!
Hope this helps :)
In eclipse Go to Windows --> Preferences --> Java --> Installed JRE's and see whether any JRE in mentioned there.
Caveat: I don't know anything about the Mac, so YMMV.
Check your JAVAHOME environment variable. On most systems, that is how the JRE broadcasts its location to apps that want to run under the current JRE.
Download the offline executable file on Java.com and make sure that if your system is 32-bit or 64-bit you should download the one that is appropriate with your system. After installing Java try running eclipse and it should run.
Go to "environment variables" from "advance system settings".
Add JAVA_HOME variable (both user and system variables) and value= "path of jre" example: "C:\Program Files\Java\JDK_1.8\jre\bin".
Add jre path to "Path" variable "...; C:\Program Files\Java\JDK_1.8\jre\bin".
Then it works..
If still there is a problem, copy jre directory to path where Eclipse IDE Application works.
Launching eclipse via terminal worked for me. Try that.
#all thanks a lot.
It some or how works after two restarts don no why..
Thanks and sorry for the trouble
OS: Windows XP
I am using yuicompressor-2.4.2 to compress some CSS before uploading to my server.
But when I run it, the following exception appears:
Exception in thread "main" java.lang.UnsupportedClassVersionError:
com/yahoo/platform/yui/compressor/Bootstrap (Unsupported major.minor version 48.0)
So I think it's because of the JRE.
I typed in the command:
cmd: java -version
And it says:
java version "1.3.1_01"
But it should say 1.6.0_16, since I have installed the latest version.
What should I do to make Java use the latest version instead of the old one?
Set the environment variable JAVA_HOME pointing to the directory where you have jdk 1.6.0
set JAVA_HOME=your_path_to_jdk1.6
set PATH=%JAVA_HOME%/bin;.;..;%PATH%
That's from a command window. Also you can do it from "My PC > Properties > Advanced > Environment variables"
Go to the system32 directory C:\Windows\System32 and delete following 3 files
java.exe
javaw.exe
javaws.exe
Now create a JAVA_HOME environment variable with value={root path of your jdk installation} and add the path till bin folder of your jdk in the PATH environment variable.
Open a fresh command prompt and run java -version to confirm the change
If you are using windows 7/10 go to command prompt and type
where java
Delete all the symbolic link shows below other than your actual installation directory.
Even if correctly added all the environment variables still sometime you can get wrong versions especially when you have multiple version installed in your system and want to switch between them.
On Windows, the JRE installs a java executable in the Windows directory, which should be the first java in your path. This is just a wrapper that looks in the Windows Registry to find the Java home directory (should be "%SystemDrive%\Program Files\Java\jre6" for Java 6) and runs using the libraries there.
Run %SystemRoot%\system32\java -version and see what you get. If that is Java 6, you have entries in your path before %SystemRoot%\system32 (which really should be first). Either fix your %PATH% variable, or you'll have to be explicit whenever you want to run this version of Java.
If running that instance of java doesn't report Java 6, its not installed (correctly). Uninstall and try installing again.
If you are having trouble because of the PATH, it is because you or some software you installed monkeyed with it; I recommend using the default which is to have system32 first. Everything works fine if the defaults are used.
Also, %JAVA_HOME% is not used by the JRE itself at all. Some common Java applications like tomcat and ant honor the %JAVA_HOME% setting, so perhaps yuicompressor does too. But this is a de facto convention, not a standard.
after where java in Command prompt
for example
where java
C:\Program Files\Common Files\Oracle\Java\javapath
C:\Program Files\Java\jdk-11.0.10\bin\java.exe
delete C:\Program Files\Common Files\Oracle folder
then close all terminals and write java -version in the terminal. it will show the right version
worked for me
You should modify your PATH environment variable:
My PC > Right click > properties > Advanced > Environment variables
And modify "Path"
Append at the end the path to your 1.6 installation:
;C:\jdk1.6.xxx\bin
and remove the previous one if present.
Add %JAVA_HOME%/bin to your PATH environment variable where JAVA_HOME is set to your JRE6u16 directory
I had the same problem. In System Properties > Environment Variables > System Variables > PATH make sure there is no other path associated with Java. To make sure, type in and check Java paths.
where java
Re-open Command Prompt and type java -version again. I hope this helps.
first by the following command, you should be aware of .exe file which runs when you type java in the command prompt
where java
C:\Program Files\Common Files\Oracle\Java\javapath
C:\Program Files\Java\jdk-11.0.10\bin\java.exe
as you see above , cmd first reads java from
C:\Program Files\Common Files\Oracle\Java\javapath
so go to the path above and remove java files .
then it should work fine
You should check your PATH environment variable. It is possible that some application you have installed has put its version of the jre in front of yours in the path.
It looks like the older Java version is still on the system PATH environment variable (where the OS looks for commands) or JAVA_HOME (where yuicompressor may look for the java executable)
How those variables are changed depends on your operating system.