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
LVL 1
daskas27Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Radek BaranowskiFull-stack Java DeveloperCommented:
what happens when you open command line and try to run

java -version

?
0
daskas27Author Commented:
Please see the uploaded jpg file
java-screen.jpg
0
Radek BaranowskiFull-stack Java DeveloperCommented:
can you get JAVA_HOME variable ? is it set up ?

try in command line

set | findstr JAVA
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

daskas27Author Commented:
I am sorry. I don't understand.
0
Radek BaranowskiFull-stack Java DeveloperCommented:
open command line like you did for trying out java -version, and run this command

"set | findstr JAVA"

and show me output please.
0
daskas27Author Commented:
I am not sure I used the correct character for the vertical line. Please see the uploaded file.
java-screen2.jpg
0
Radek BaranowskiFull-stack Java DeveloperCommented:
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:

JAVA_HOME
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 ?
0
daskas27Author Commented:
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?
0
Radek BaranowskiFull-stack Java DeveloperCommented:
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
0
daskas27Author Commented:
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
0
daskas27Author Commented:
Here is the path from the problem machine. Please see the uploaded file
path-2.txt
0
CEHJCommented:
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
0
Radek BaranowskiFull-stack Java DeveloperCommented:
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
0
CEHJCommented:
it will list you actual files this directory contents link to
What makes you think that's a junction (link)?
0
Radek BaranowskiFull-stack Java DeveloperCommented:
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

links
I'm still not sure how to navigate out of this, though.
0
CEHJCommented:
Right! OK daskas27, so can you now please mimic the commands that Radek just ran?
0
daskas27Author Commented:
Done, same. Same on both machines. The one that is working and the one that is not.
0
CEHJCommented:
You haven't posted the output that Radek posted. That's what we want
0
daskas27Author Commented:
Please see the uploaded filejava-screen3.jpg
0
Radek BaranowskiFull-stack Java DeveloperCommented:
alright, then try to run your install program with -is:javahome option

<install program>  –is:javahome "C:\Program Files (x86)\Java\jre1.8.0_31"

it should run, I supposed, but it's hard to really cleanup java installation issues remotely. I would expect if you'd follow CEHJ's advice and wipe all existing Javas clear out of your machine, then install just a single one anew, it would work without all this stretching...but yeah, for now try the above please.
0
daskas27Author Commented:
I had to leave my desk for a while. I will attempt this as soon as I return.  Thank you
0
CEHJCommented:
<install program>  –is:javahome "C:\Program Files (x86)\Java\jre1.8.0_31"

Open in new window


should really only be necessary if JAVA_HOME is either NOT set or you want to use something else

You DID make sure it's now set to c:\ProgramData\Oracle\Java\javapath didn't you? And you DID set PATH as i mentioned earlier?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
daskas27Author Commented:
Thanks for your help
0
CEHJCommented:
:)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.