Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDK configuration issues

 
Jane Doughty
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Some help please....
I installed JDK version 7 to the following directory on my Windows 7:
C:\Program Files (x86)\Java\jdk1.7.0_06

This appears to have been successful. I then went to update my JAVA_HOME and path thusly:
JAVA_HOME
c:\Program Files (x86)\Java\jdk1.7.0.06

path (added the last item to existing path)
C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Ulead Systems\MPEG;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\QuickTime\QTSystem\;%JAVA_HOME%\bin;

I then go out to the command prompt to test it with java -version and get the following errors:
C:\Users\Jane>java -version
Error: opening registry key 'Software\JavaSoft\Java Runtime Environment'
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.

I can execute the java -version from the JDK1.7.0.06\bin directory, but nowhere else.

Any assist would be appreciated


 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome..

How exactly did you install java?

You cannot just simply explode a package and expect it to work in Windows.

You should really use the installer as supplied by Oracle as this will tweak the registry as well.

Also, I HATE spaces in paths, and I'm wondering if that may be a problem also.

WP
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try to echo JAVA_HOME from command prompt?
Try just adding c:\Program Files (x86)\Java\jdk1.7.0.06\bin to your path variable, without using JAVA_HOME, and see if that works.
 
Jane Doughty
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, I used the install wizard that was with the JDK download and it termed it successful...As for the spaces in the directory, this was the default directory that the installer used, so I just allowed it to default, figuring it would be the best option. Would you recommend reinstalling to another directory?
Kemal, my first attempt was to directly update the path without the JAVA_HOME so it has the same effect.
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, the message suggests there is an issue with Java Runtime Environment, so I would suggest you download and (re)install it again from here
EDIT: Download windows installer, not packages.
 
Filipe Fortes
Greenhorn
Posts: 1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You installed on:
C:\Program Files (x86)\Java\jdk1.7.0_06

Yet, you used this on the path:
JAVA_HOME
c:\Program Files (x86)\Java\jdk1.7.0.06


try changing the jdk1.7.0.06 on the JAVA_HOME to jdk1.7.0_06
 
Jane Doughty
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,
Thanks for the assists. I found that there was a windows installer problem that was causing issues with the install. I ran Windows Fixit and reinstalled, and checked the JDK configuration and it seems to have me well on my way. Your suggestions got me going in the right direction.
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheers, and welcome to the Ranch!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic