aspose file tools*
The moose likes Beginning Java and the fly likes JDK configuration issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JDK configuration issues" Watch "JDK configuration issues" New topic
Author

JDK configuration issues

Jane Doughty
Greenhorn

Joined: Aug 28, 2012
Posts: 3


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

Joined: Mar 28, 2012
Posts: 859

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

Joined: Jun 19, 2010
Posts: 825
    
    5

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.


The quieter you are, the more you are able to hear.
Jane Doughty
Greenhorn

Joined: Aug 28, 2012
Posts: 3
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

Joined: Jun 19, 2010
Posts: 825
    
    5

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

Joined: Aug 28, 2012
Posts: 1
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

Joined: Aug 28, 2012
Posts: 3
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

Joined: Jun 19, 2010
Posts: 825
    
    5

Cheers, and welcome to the Ranch!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDK configuration issues