Link to home
Start Free TrialLog in
Avatar of Dave Stone
Dave StoneFlag for United States of America

asked on

Older Install "A suitable JVM could not be found. Please run the program......"

Hello,
      I have a user who needs to install an older program that runs java. Whenever I attempt to install it I get an error stating “A suitable JVM could not be found. Please run the program again using the option –is:javahome <JAVA HOME DIR>. I uninstalled all instances of JAVA and reinstalled the latest version. The computer is running Windows 7 SP1. He has a laptop with basically the same configuration and it installs and runs fine. I am running the same configuration on my pc and it installs fine. Any help with this would be appreciated.

Thank you,
Dave
Avatar of Radek Baranowski
Radek Baranowski
Flag of Poland image

what happens when you open command line and try to run

java -version

?
Avatar of Dave Stone

ASKER

Please see the uploaded jpg file
java-screen.jpg
can you get JAVA_HOME variable ? is it set up ?

try in command line

set | findstr JAVA
I am sorry. I don't understand.
open command line like you did for trying out java -version, and run this command

"set | findstr JAVA"

and show me output please.
I am not sure I used the correct character for the vertical line. Please see the uploaded file.
java-screen2.jpg
yeah, you don't have JAVA_HOME variable set

so what you need to do is to press Windows+Pause/Break (to go into system info/settings),then Advanced system settings, Environment Variables and add JAVA_HOME variable to your system, like on the screenshot:

User generated image
then just just confirm with OK, in both dialogs.

now, when you open NEW command line (not the one you used previously), you should see JAVA_HOME set when you repeat the command "set | findstr JAVA". I would also expect your program to run too. can you please check ?
First, I ran the command line from my pc which will run the program. I did check the variables on the users pc and there is not a variable for JAVA_HOME. How would I know the path?
if you are able to run "java" in command line, then get java's path with

set | findstr PATH

there must be java directory on the path. strip it from /bin part and this is your JAVA_HOME directory
I have copied and uploaded my path to notepad. I have actually copied my path to the users machine and though I can run the install he can't. I will upload a copy of his path in a minute.
path.txt
Here is the path from the problem machine. Please see the uploaded file
path-2.txt
Uninstall all Java from your system then install the latest version. Reset JAVA_HOME to the directory into which it was installed. Then PREpend the following to PATH
%JAVA_HOME%\bin;

Open in new window


Then open a NEW cmd.exe and post output of

java -version

Open in new window

please
I am not familiar with this Windows way of setting things up.
 anyway

in command line go to

c:\ProgramData\Oracle\Java\javapath       "cd c:\ProgramData\Oracle\Java\javapath"

and run

dir

it will list you actual files this directory contents link to. and willl reveal you the true java location which will probably be
c:\program files(x86)\Java\jre_xxx
it will list you actual files this directory contents link to
What makes you think that's a junction (link)?
because I checked. that's the new scheme from our beloved oracle. I'm as surprised as you :) believe me. I gues it started from Java 8, before it was a standard convolution of Path/Java_home

http://nerdanswer.com/answer.php?q=689279

User generated image
I'm still not sure how to navigate out of this, though.
Right! OK daskas27, so can you now please mimic the commands that Radek just ran?
Done, same. Same on both machines. The one that is working and the one that is not.
You haven't posted the output that Radek posted. That's what we want
Please see the uploaded fileUser generated image
SOLUTION
Avatar of Radek Baranowski
Radek Baranowski
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I had to leave my desk for a while. I will attempt this as soon as I return.  Thank you
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for your help
:)