• Post Reply Bookmark Topic Watch Topic
  • New Topic

Registry error  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Newbie here and not sure if this is the place to post this so if it needs to be relocated please do.

I have recently updated a machine to Build 1.8.0_66 and from a command prompt "java.exe -version" returns a registry error (I don't have my notes from work so I cannot give the exact message at the moment)

On my home machine with Build 1.8.0_65 returns a correct build number.

I have searched to no avail I guess since it is so new.
 
Ranch Hand
Posts: 934
4
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we want to know the error you are getting then only we can help.. Otherwise only blind guess will be there..
 
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Please show us the error message, as already mentioned. Also what do you get when you give the following two commands:-
echo %PATH%
echo %CLASSPATH%

The latter may return nothing; that is all right.
 
Campbell Ritchie
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should write java -version not java.exe -version.
 
Bud Dryman
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\>where java
C:\ProgramData\Oracle\Java\javapath\java.exe

C:\>echo %path%
C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)..........(edited)

C:\>echo %classpath%
%classpath%

C:\>java -version
Failed reading value of registry key:
Software\JavaSoft\Java Runtime Environment\1.8\JavaHome
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*

If I navigate to c:\programdata\oracle\java\javapath there is a .symlink to c:\program files\java\jre1.8.0_66\bin\java.exe, if I navigate to that location I get the following:


C:\Program Files\Java\jre1.8.0_66\bin>java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
 
Campbell Ritchie
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bud Dryman wrote:. . .
C:\>where java
C:\ProgramData\Oracle\Java\javapath\java.exe
. . .
If I navigate to c:\programdata\oracle\java\javapath there is a .symlink to c:\program files\java\jre1.8.0_66\bin\java.exe, if I navigate to that location I get the following:


C:\Program Files\Java\jre1.8.0_66\bin>java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
What is your javapath variable?
Why are you using a symlink? Do symlinks actually work on Windows?
You should not need to navigate to Program Files; you should add the PATH to that bin folder to your system PATH environment variable.
 
Bud Dryman
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no javapath variable. The path variable of c:\programdata\oracle\java\javapath is added and updated by the java installer so I don't have to modify the PATH every update.

I know I shouldn't have to navigate to program files but it was a test to make sure java -version worked correctly in that location.
 
Bud Dryman
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also regarding simlinks. They worked prior to the 66 update.
 
Campbell Ritchie
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't use Windows a lot, but I don't remember my installers using symlinks or automatically updating the PATH to the Java® installation folder. Please explain some more.
 
Bud Dryman
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know how long symlinks have been used since the only machines I could test on started with Version 8 Update 51 which also had the symlinks which pointed to the correct directory.

 
Campbell Ritchie
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest you use the conventional methods of setting the PATH directly. Try this instruction at the command line:-
set PATH="C:\Program Files\Java\jre1.8.0_66\bin";%PATH%
That will set the PATH for the lifetime of that command prompt.

Don't know much about symlinks, I am afraid.
 
Bud Dryman
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your help but since this is a published application I don't have control over everyone's environment and this is breaking our existing system so its back to the drawing board to see what I can do.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!