javainstaller home argument - java

please help. while running the NetBeans 8.2 installer, it says jdk not found on this computer. specify jdk location using "javahome installer argument". i went to the command prompt and ran the installer from there. i gave the address of the installer then --javahome "the directory of the jdk" . and it still does not run. please help me. I dont know what to do. I have tried every solution i came across but nothing works. can somebody please explain what is the problem? I have jdk 9.0.1.

First, make sure you install JDK (not JRE) on your computer.
Then, open file {path-to-netbeans}/etc/netbeans.conf and edit a line netbeans_jdkhome to
netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_144"

Such self-sure responses, such finality, all apparently basically wrong. (For three years.)
This problem appears to be a finicky demand by a lazy installer programmer. I put the JDK on the E: drive. I got past the problem with:
Apache-NetBeans-12.4-bin-windows-x64.exe --javahome E:\jdk-16.0.1\
(Note the double hyphen, as you apparently knew to do [the installer's error message box shows only -javahome] and note that putting quotes around it failed, but removing the quotes worked.)

I ran into the same, the following worked for me with Apache 12.6
Apache-NetBeans-12.6-bin-windows-x64.exe --javahome "c:\Program Files (x86)\Java\jdk1.8.0_321"
Best of luck note the double hyphens in JAVA_HOME and double quotes in JDK location. The Netbeans error screen suggests a single hyphen, but that did not work for me

Related

JBOSS/WildFly: CreateProcess error=193, %1 is not a valid Win32-program, how am I supposed to fix this?

I am trying to launch WildFly via IntelliJ
When I add the following line inside the Startup Script:
..\bin\standalone.sh -c standalone-full.xml
I get an error saying:
Error running 'JBOSS':
Cannot run program "C:...." (in directory "C...": CreateProcess error=193, %1 is not a valid Win32-program
I've read on StackOverFlow that this might be a mismatch between 32 bit and 64 bit DLL files? But I doubt this is the case. It works fine without that tag, but I need to launch my server with this startup script.
Or am I missing something else when trying to run a .jar file? I have javac, JAVA_HOME and java -version setup, am I missing something else?
I'm answering my own post because my situation was a really special one, but none the less it would have helped me if I began at this point.
My first issue was that I had no idea I was supposed to use the bat script. (I bet this will give some laughs but whatever)
The second issue, which made everything so confusing, was that my JBOSS_HOME environment variable wasn't setup right.. Well what do you mean wasn't setup right, that's easy bro? Well yes of course it is - but IntelliJ didn't register it properly. So whenever I configured everything, it kept saying that it looked toward another directory, and might not work properly within JBOSS's console.
My fix:
Path was setup correct, but under IntelliJ IDEA's values, it said %JBOSS_HOME%\bin. I wasn't sure if it pointed to the same JBOSS setup that Windows does, or if it pointed to one I had deleted. I removed this from IntelliJ IDEA's path (NOT the Path within Windows) and now IntelliJ finds my JBOSS correctly and it works..
Maybe this helps someone in the future. It would have saved me some time, but atleast I learnt something.

Multiple Java installations leading to 'Command not found' error on Linux 2.6 system

I desperately need some help in installing Java on my server on GoDaddy. At first, I followed instructions mentioned here: https://www.tecmint.com/install-apache-tomcat-in-centos because installing Tomcat is my actual goal. I downloaded 'jdk-8u101-linux-x64.rpm' and did everything as mentioned in the tutorial. At the end of it, when I try to test using the command java -version, I get -bash: java: command not found. It didn't work even after logging out and logging in again.
Then I followed instructions as mentioned here: https://in.godaddy.com/help/how-to-install-java-on-ubuntu-12351 and got the same error at the end.
When I try whereis java, I get /usr/bin/java /usr/local/java /usr/share/java. Is it that there are many Java instances and that's why the command isn't executing?
NOTE: The $PATH(/usr/local/jdk/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/cpanel/composer/bin:/usr/local/java/jre1.8.0_25/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin) does include the bin folder of jre.
Any help would be greatly appreciated. Thanks in advance :)
Turns out my Java was installed at a different location completely and that wasn't included in the path. This tutorial(https://www.tecmint.com/install-apache-tomcat-in-centos) explains everything in detail except it missed out the point to add Java to the path.
Added that to the path and it's working perfectly since then. Thanks for your help guys :)
I suggest you debug your problem by step by step (Do not follow any step without having success in all the steps before):
Determine which directory java has been installed to. According with the URL you said, it must be /usr/local/java/jre1.8.0_25. Right?
Set the current directory to that path and look for a file named "java", on which you shall have execution permission. If it is not there, java has not been successfully installed. Try re-installing again.
Execute "java -version" from the command line. It should show "1.8.0". If not, the installation is wrong and you should try re-installing too.
Switch to your HOME path, and try to execute "/bin/java". The result should be the same as in point 3.
Ensure that path is correctly included into the PATH environment variable. Try then "java -version". The result should be the same as in point 3. If not, check the PATH variable.

Why can't Java open the jvm.cfg file? [duplicate]

After years of working OK, I'm suddenly getting this message when trying to start the JVM:
Error: could not open `C:\Program Files\Java\jre6\lib\amd64\jvm.cfg'
I tried uninstalling, and got a message saying a DLL was missing (unspecified)
Tried re-installing, all to no avail.
At the same time, when trying to start Scala I get:
\Java\jdk1.6.0_25\bin\java.exe was unexpected at this time.
Checked %JAVA_HOME% and %path% - both OK
Can anyone help?
I checked my environment variables - JAVA_HOME & PATH and they all refer to C:\java. So this was bit frustrating. After sometime I found that the default installation also copied java.exe, javaw.exe and javaws.exe to C:\Windows\System32 (i.e. uninstall of JRE didn't go well). I just removed them and voila, I'm back on track. That annoying error is no longer popping.
This works for me
So, If exists, remove java.exe, javaw.exe and javaws.exe from System32
put %JAVA_HOME%\bin at the begin of PATH.
Might be a slightly different cause, but that second issue occurs for me in scala 2.9.0.1 on Win7 (x64), though scala-2.9.1.final has already resolved this issue mentioned here:
\Java\jdk1.6.0_25\bin\java.exe was unexpected at this time.
My %JAVA_HOME% set to a path like this: c:\program files(x86)\Java\jdk...
Note the space and the parentheses.
If you change line 24 in %SCALA_HOME%\bin\scala.bat from:
if exist "%JAVA_HOME%\bin\java.exe" set _JAVACMD=%JAVA_HOME%\bin\java.exe
to
if exist "%JAVA_HOME%\bin\java.exe" set "_JAVACMD=%JAVA_HOME%\bin\java.exe"
It works fine. Note the quotes around the set command parameters, this will properly enclose any spaces and 'special' characters (eg: spaces and parentheses) in the variable's value.
Hope this helps someone else searching for an answer.
I had a slight different solution to this problem. my PATH and JAVA_HOME were pointing to JDK12 in
C:\Program Files\Java
but execution of the command:
Java -version
gave the error:
Error: could not open `C:\ProgramFiles\Java\jre1.8.0_212\lib\amd64\jvm.cfg'
I had to delete a folder of executables (Java.exe, javaw.exe etc.) in a different directory than System32, as other answers here and blog posts have suggested. Instead I found the problem lied with executables found in:
C:\Program Files\Common Files\Oracle
as there was nothing Java related in
C:\Windows\System32
If you're having this issue and nothing is in System32, check this "common files" directory mentioned above for an oracle directory and delete it.
After, your PATH references should work fine!
I had the same problem: I have a 64 bit Windows and when I typed "java -version" in CMD-Console i received the same Error message.
Try to start a 64bit-cmd(C:\Windows\SysWOW64\cmd.exe) and you will see, it works there ;)
C:\ProgramData\Oracle\Java\javapath
I took a back up of the files in it and removed those files from there. Then I opened a new cmd prompt and it works like a charm.
If this was working before, it means the PATH isn't correct anymore.
That can happen when the PATH becomes too long and gets truncated.
All posts (like this one) suggest updating the PATH, which you can test first in a separate DOS session, by setting a minimal path and see if java works again there.
Finally the OP Highland Mark concludes:
Finally fixed by uninstalling java, removing all references to it from the registry, and then re-installing.
scary ;)
I thought I will share how I resolved the same issue "Error Could not open lib\amd64\jvm.cfg". I found the Java run time Jre7 is missing amd64 folder under lib. However, I have 1.7.0_25 JDK which is having jre folder and also having amd64.
I moved the original contents of jre7 folder to a backup file and copied everything from 1.7.0_25\jre.
Now I am not getting this error anymore and able to proceed with scene builder.
The Java 7 install on my work PC broke after a patch was forced out to us, giving this error any time you tried to run a Java program. Somehow the entire 'lib' subdirectory of the Java 7 install vanished! Might have been related to having both Java 6 and Java 7 installed -- the 'jre6' directory still had everything there.
In any case, I fixed it by uninstalling both Java 6 and Java 7 and reinstalling just Java 7. But if the file it's complaining about is actually there, then you're likely having a path issue as described in some of the other answers here.
Had suddenly the same Problem, from one day to another eclipse said
Failed to load the JNI shared library "C:/JDK/bin/client/jvm.dll"`.
after trying to run java on the console
Error: could not open `C:\WINDOWS\jre\lib\amd64\jvm.cfg'
now i just deleted the whole directory
C:\WINDOWS\jre
and everything worked again... i don't know there this jre came from, i hope it was not a virus
Another workaround is using shortpath in windows:
open windows command console using cmd.exe
goto c:\
type command> dir program* /x
it should display as short path like: PROGRA~2
so C:\PROGRA~2 is same as C:\Program Files (x86)
in your JAVA_HOME replace path to :
C:\PROGRA~2\Java\jre7
This should work in windows 64 environment as it worked for me in win7 64bit version.
I have changed the java installation path from c:\Program Files (x86)\java to another folder like c:\java\jdk1.7 and updated the %Java_HOME% and path values accordingly,it worked.
example
%JAVA_HOME% = C:\java\JDK1.7
path-C:\java\JDK1.7\bin;
I had the same problem in Eclipse and I fixed it by changing the JRE from 64 bit to 32 bit:
Window > Preferences > Java > Installed JREs > Add... > Next > Directory > select "C:\Program Files (x86)\Java\jre1.8.0_65" instead of "C:\Program Files\Java\jre1.8.0_60"
I had a similar problem (trying to start a Jenkins slave agent on Windows) on Windows 2008R2, Java 1.7.0_15
I had two situations that contributed to the problem and that changing both of them fixed it:
1) Installing Java in a unix-compatible path (changing from c:\Program Files\... to c:\Software\...); I don't think this directly affected the problem described in this thread, but noting the change;
2) Running Java not through a shortcut. It originally failed with a shortcut, but re-running from the direct executable (C:\Software\Java...\bin\java) worked.
Reinstalling java didn't help me. But the trick to put the JAVA_HOME variable at the beginning of the env-vars. The problem occoured after an upgrade from jdk1.7.0_11 to jdk1.7.0_13
I had this problem after updating your java. The best way to solve this problem is just go to your c:/ProgramFiles/Java folder. There you will find two jre folders one is as jre.your version and other with exactly like jdk folder. Try to remove jre.1.your version folder. There you go your problem is solved. Hope this might help. It's worked for me.
Typically it because of upgrading JRE.
It changes symlinks into C:\ProgramData\Oracle\Java\javapath\
Intall JDK - it will fix this.
Error: could not open `C:\Program Files\Java\jre6\lib\amd64\jvm.cfg'
Looking # it the issue of post install script is there and getting propagated since I am using update jdk8 1.8.0_191 since issue occurred with me after installing update of java and which was happened automatically.
Error: could not open `C:\Program Files\Java\jre1.8.0_191\lib\amd64\jvm.cfg'
This will be never ending in this case and need to do workaround like changing path's manually.
Delete the jars under system32 for windows.
Delete the jars under C:\Program Files\Common Files\Oracle
Edit the environment variable set JAVA_HOME and SET PATH to bin
I have solved this issue by deleting the Oracle folder from Program Data. And also delete the oracle java path associated with that folder from environment variables.
I kept variable name as "Path" but it did not work after changing it to "PATH"
started working for me.
variable name: PATH
variable value: C:\Program Files\Java\jdk-19\bin
this will work.
It wasn't in the path. Finally fixed by uninstalling java, removing all references to it from the registry, and then re-installing. None the wiser, but back working again. Thanks all #Highland Mark- Can you tell me the process to removing references from registry. I tried all possible way people mentioned here, nothing worked.
If you have downloaded several Jdks you have to delete all except of the JDK you want to use!

NLTK fails to find the Java executable

I am using NLTK's nltk.tag.stanford, which needs to call the java executable.
I set JAVAHOME to C:\Program Files\Java\jdk1.6.0_25 where my jdk is installed, but when run the program I get the error
"NLTK was unable to find the java executable! Use the config_java() or set the JAVAHOME variable"
Then I spent 3 hours on debugging it and tried
config_java("C:/Program Files/Java/jdk1.6.0_25/")
config_java("C:/Program Files/Java/jdk1.6.0_25/bin/")
and those without the ending "/".
However the nltk still cannot find it.
Anyone has idea about what's going wrong? Thanks a loooot!
If setting the JAVA_HOME environment doesn't help you, try this:
config_java() did not work for me. I add the following lines to my code and it worked:
import os
java_path = "C:/Program Files/Java/jdk1.7.0_11/bin/java.exe"
os.environ['JAVAHOME'] = java_path
I am running Windows 7 64-bit
I spent about seven hours working through this problem, and finally found a solution. You can write your java directory right into lines 69 and 72 of the internals.py file (build 2.0.4) as follows:
##########################################################################
# Java Via Command-Line
##########################################################################
_java_bin = 'C:\Program Files\Java\jdk1.7.0_25\\bin\java.exe'
_java_options = []
# [xx] add classpath option to config_java?
def config_java(bin='C:\Program Files\Java\jdk1.7.0_25\\bin\java.exe', options=None, verbose=True):
This resolves the problem for me. (I'm working in a 32 bit Windows environment)
protos1210's tip worked for me, with a few minor changes. The full answer is:
import nltk
nltk.internals.config_java("C:/Program Files/Java/jdk1.6.0_30/bin/java.exe")
After I restarted IDLE, the following code worked.
import nltk
path_to_model = "C:/Program Files/stanford-postagger-2012-05-22/models/english-bidirectional-distsim.tagger"
path_to_jar = "C:/Program Files/stanford-postagger-2012-05-22/stanford-postagger.jar"
tagger = nltk.tag.stanford.POSTagger(path_to_model, path_to_jar)
tokens = nltk.tokenize.word_tokenize("I hope this works!")
print tagger.tag(tokens)
Output is: [('I', 'PRP'), ('hope', 'VBP'), ('this', 'DT'), ('works', 'VBZ'), ('!', '.')].
I never could get it to recognize my JAVAHOME environment variables.
I looked here and the docs seem to suggest that the argument ought to look like
config_java("C:/Program Files/Java/jdk1.6.0_25/bin/java")
depending on your environment you might want to try reinstalling the nltk binary. I installed from binary and then later upgraded via easy_install and it incorrectly installed the osx version of nltk which caused exceptions when ntlk couldn't find my java binary.
I have tried all the above mentioned solutions and also the ones on Google Groups, but none worked. So after few more rounds of trial and modifications to above answers, the following piece of code worked for me :-
>>> import os
>>> os.environ['JAVAHOME'] = "C:/Program Files/Java/jdk1.8.0_31/bin" #insert approriate version of jdk
And then I tried NERTagger code :-
>>> from nltk.tag.stanford import NERTagger
>>> st = NERTagger('stanford-ner-2014-06-16/classifiers/english.all.3class.distsim.crf.ser.gz','stanford-ner-2014-06-16/stanford-ner.jar')
>>> st.tag('John has refused the offer from Facebook. He will work for Google'.split())
And the following was the output I received
'John', u'PERSON'), (u'has', u'O'), (u'refused', u'O'), (u'the', u'O'), (u'offer', u'O'), (u'from', u'O'), (u'Facebook', u'ORGANIZATION'), (u'.', u'O')]
Tested on Windows 7 64-bit
I too have been running into problems with this. It has been such a headache!
I got this to work on my machine (Win7_x64)
Replace 'jdk1.6.0_30' with your version of the jdk. Run this command:
config_java("C:/Program Files/Java/jdk1.6.0_30/bin/java.exe")
[Found C:/Program Files/Java/jdk1.6.0_30/bin/java.exe: C:/Program Files/Java/jdk1.6.0_30/bin/java.exe]
I do not know why it has been this difficult to get working. Hope this helps!
Another possibility when facing this error message while using the stanford package in NLTK is if you use StanfordTagger instead of PosTagger or NERTagger. According to Google Groups, there was a design to encourage users away from the general StanfordTagger class and towards one of the two specific taggers.
Another distinct answer for this situation is you are using an IDE such as Eclipse. Even if you have set your JAVA_HOME environment variable and even if you explicitly call config_java and you get the [Found ... /bin/java.exe] message returned to you, you could still have to set the runtime environment for your IDE. The reason is that when you invoke the tagger, config_java is called again as part of the process and your original attempts at settings the path to the java binary executable can therefore be overwritten.
I realize that this is an old question but here is the solution that worked for me (running on Windows 7-64 bit). Hopefully it will save someone some time.
I implemented the solution given here:
"I have been able to get it working by commenting out two lines in the batch_tag function in
\nltk\tag\stanford.py
The lines are line 59 and 85.
config_java(options=self.java_options, verbose=False)
and
config_java(options=default_options, verbose=False)
respectively."
After commenting out the lines I set the path to the Java executable in the same manner mentioned in other answers:
nltk.internals.config_java("path/to/javadk/bin/java.exe")
A kludgey but workable solution. Everything worked fine after that.
Hopefully this saves someone else some time when trying to fix this problem. I'm pretty new to programming, Python and the NLTK, and didn't realize when I was trying to implement #dduhaime's solution that there are two 'internals.py' files: one in the nltk folder (path=C:\nltk-2.0.4 on my computer) and one in my Python27 folder (path=C:\Python27\Lib\site-packages\nltk-2.0.4-py2.7.egg\nltk on my computer). You have to add the path to the java directory on lines 69 & 72 in the latter 'internals.py' file, or the NLTK will still not be able to find it.
My environment: Windows 7 64 bit, NLTK build 2.0.4
I implemented a workaround for this because NLTK is misunderstanding the meaning of the JAVA_HOME variable:
import os
if os.environ.get("JAVA_HOME") is not None and "/bin" not in os.environ["JAVA_HOME"]:
os.environ["JAVAHOME"] = os.path.normpath(os.path.join(os.environ["JAVA_HOME"], "bin"))
This basically takes the correct value you have in JAVA_HOME, and creates the NLTK-friendly version and stores it in JAVAHOME. NLTK will check both so this will find the binary. You need to do this before the tagger is created, obviously.
I came across the same issue and this is what worked for me which is really simple. When you are setting up JavaHome variable set the path to jdk folder in your machine like below:
C:\Program Files\Java\jdk\ - This did work
C:\Program Files\Java\jdk - This did not work
This answer is for ubuntu 14.04 .
commenting out two lines in the batch_tag function in \nltk\tag\stanford.py
The lines are line 59 and 85.
config_java(options=self.java_options, verbose=False) and
config_java(options=default_options, verbose=False) respectively.
After commenting out the lines I set the path to the Java executable in the same manner mentioned in other answers:
nltk.internals.config_java("path/to/javadk/bin/java")
Everything worked fine after that.

Running Java gives "Error: could not open `C:\Program Files\Java\jre6\lib\amd64\jvm.cfg'"

After years of working OK, I'm suddenly getting this message when trying to start the JVM:
Error: could not open `C:\Program Files\Java\jre6\lib\amd64\jvm.cfg'
I tried uninstalling, and got a message saying a DLL was missing (unspecified)
Tried re-installing, all to no avail.
At the same time, when trying to start Scala I get:
\Java\jdk1.6.0_25\bin\java.exe was unexpected at this time.
Checked %JAVA_HOME% and %path% - both OK
Can anyone help?
I checked my environment variables - JAVA_HOME & PATH and they all refer to C:\java. So this was bit frustrating. After sometime I found that the default installation also copied java.exe, javaw.exe and javaws.exe to C:\Windows\System32 (i.e. uninstall of JRE didn't go well). I just removed them and voila, I'm back on track. That annoying error is no longer popping.
This works for me
So, If exists, remove java.exe, javaw.exe and javaws.exe from System32
put %JAVA_HOME%\bin at the begin of PATH.
Might be a slightly different cause, but that second issue occurs for me in scala 2.9.0.1 on Win7 (x64), though scala-2.9.1.final has already resolved this issue mentioned here:
\Java\jdk1.6.0_25\bin\java.exe was unexpected at this time.
My %JAVA_HOME% set to a path like this: c:\program files(x86)\Java\jdk...
Note the space and the parentheses.
If you change line 24 in %SCALA_HOME%\bin\scala.bat from:
if exist "%JAVA_HOME%\bin\java.exe" set _JAVACMD=%JAVA_HOME%\bin\java.exe
to
if exist "%JAVA_HOME%\bin\java.exe" set "_JAVACMD=%JAVA_HOME%\bin\java.exe"
It works fine. Note the quotes around the set command parameters, this will properly enclose any spaces and 'special' characters (eg: spaces and parentheses) in the variable's value.
Hope this helps someone else searching for an answer.
I had a slight different solution to this problem. my PATH and JAVA_HOME were pointing to JDK12 in
C:\Program Files\Java
but execution of the command:
Java -version
gave the error:
Error: could not open `C:\ProgramFiles\Java\jre1.8.0_212\lib\amd64\jvm.cfg'
I had to delete a folder of executables (Java.exe, javaw.exe etc.) in a different directory than System32, as other answers here and blog posts have suggested. Instead I found the problem lied with executables found in:
C:\Program Files\Common Files\Oracle
as there was nothing Java related in
C:\Windows\System32
If you're having this issue and nothing is in System32, check this "common files" directory mentioned above for an oracle directory and delete it.
After, your PATH references should work fine!
I had the same problem: I have a 64 bit Windows and when I typed "java -version" in CMD-Console i received the same Error message.
Try to start a 64bit-cmd(C:\Windows\SysWOW64\cmd.exe) and you will see, it works there ;)
C:\ProgramData\Oracle\Java\javapath
I took a back up of the files in it and removed those files from there. Then I opened a new cmd prompt and it works like a charm.
If this was working before, it means the PATH isn't correct anymore.
That can happen when the PATH becomes too long and gets truncated.
All posts (like this one) suggest updating the PATH, which you can test first in a separate DOS session, by setting a minimal path and see if java works again there.
Finally the OP Highland Mark concludes:
Finally fixed by uninstalling java, removing all references to it from the registry, and then re-installing.
scary ;)
I thought I will share how I resolved the same issue "Error Could not open lib\amd64\jvm.cfg". I found the Java run time Jre7 is missing amd64 folder under lib. However, I have 1.7.0_25 JDK which is having jre folder and also having amd64.
I moved the original contents of jre7 folder to a backup file and copied everything from 1.7.0_25\jre.
Now I am not getting this error anymore and able to proceed with scene builder.
The Java 7 install on my work PC broke after a patch was forced out to us, giving this error any time you tried to run a Java program. Somehow the entire 'lib' subdirectory of the Java 7 install vanished! Might have been related to having both Java 6 and Java 7 installed -- the 'jre6' directory still had everything there.
In any case, I fixed it by uninstalling both Java 6 and Java 7 and reinstalling just Java 7. But if the file it's complaining about is actually there, then you're likely having a path issue as described in some of the other answers here.
Had suddenly the same Problem, from one day to another eclipse said
Failed to load the JNI shared library "C:/JDK/bin/client/jvm.dll"`.
after trying to run java on the console
Error: could not open `C:\WINDOWS\jre\lib\amd64\jvm.cfg'
now i just deleted the whole directory
C:\WINDOWS\jre
and everything worked again... i don't know there this jre came from, i hope it was not a virus
Another workaround is using shortpath in windows:
open windows command console using cmd.exe
goto c:\
type command> dir program* /x
it should display as short path like: PROGRA~2
so C:\PROGRA~2 is same as C:\Program Files (x86)
in your JAVA_HOME replace path to :
C:\PROGRA~2\Java\jre7
This should work in windows 64 environment as it worked for me in win7 64bit version.
I have changed the java installation path from c:\Program Files (x86)\java to another folder like c:\java\jdk1.7 and updated the %Java_HOME% and path values accordingly,it worked.
example
%JAVA_HOME% = C:\java\JDK1.7
path-C:\java\JDK1.7\bin;
I had the same problem in Eclipse and I fixed it by changing the JRE from 64 bit to 32 bit:
Window > Preferences > Java > Installed JREs > Add... > Next > Directory > select "C:\Program Files (x86)\Java\jre1.8.0_65" instead of "C:\Program Files\Java\jre1.8.0_60"
I had a similar problem (trying to start a Jenkins slave agent on Windows) on Windows 2008R2, Java 1.7.0_15
I had two situations that contributed to the problem and that changing both of them fixed it:
1) Installing Java in a unix-compatible path (changing from c:\Program Files\... to c:\Software\...); I don't think this directly affected the problem described in this thread, but noting the change;
2) Running Java not through a shortcut. It originally failed with a shortcut, but re-running from the direct executable (C:\Software\Java...\bin\java) worked.
Reinstalling java didn't help me. But the trick to put the JAVA_HOME variable at the beginning of the env-vars. The problem occoured after an upgrade from jdk1.7.0_11 to jdk1.7.0_13
I had this problem after updating your java. The best way to solve this problem is just go to your c:/ProgramFiles/Java folder. There you will find two jre folders one is as jre.your version and other with exactly like jdk folder. Try to remove jre.1.your version folder. There you go your problem is solved. Hope this might help. It's worked for me.
Typically it because of upgrading JRE.
It changes symlinks into C:\ProgramData\Oracle\Java\javapath\
Intall JDK - it will fix this.
Error: could not open `C:\Program Files\Java\jre6\lib\amd64\jvm.cfg'
Looking # it the issue of post install script is there and getting propagated since I am using update jdk8 1.8.0_191 since issue occurred with me after installing update of java and which was happened automatically.
Error: could not open `C:\Program Files\Java\jre1.8.0_191\lib\amd64\jvm.cfg'
This will be never ending in this case and need to do workaround like changing path's manually.
Delete the jars under system32 for windows.
Delete the jars under C:\Program Files\Common Files\Oracle
Edit the environment variable set JAVA_HOME and SET PATH to bin
I have solved this issue by deleting the Oracle folder from Program Data. And also delete the oracle java path associated with that folder from environment variables.
I kept variable name as "Path" but it did not work after changing it to "PATH"
started working for me.
variable name: PATH
variable value: C:\Program Files\Java\jdk-19\bin
this will work.
It wasn't in the path. Finally fixed by uninstalling java, removing all references to it from the registry, and then re-installing. None the wiser, but back working again. Thanks all #Highland Mark- Can you tell me the process to removing references from registry. I tried all possible way people mentioned here, nothing worked.
If you have downloaded several Jdks you have to delete all except of the JDK you want to use!

Categories