• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting started with Java (No JVM found)  RSS feed

 
Carolina Dahfran
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I downloaded Java 9 SE-JDK today and Eclipse as IDE, and when I double-click  on the Eclipse Application to open it, it says: "A Java Runtime Environment (JRE) or Java Development Kit (JDK) must  be available in order to run Eclipse. No Java Virtual Machine was found after searching the following location: "C:Users\user\Desktop\eclipse-java-oxygen-R-win32-x86_64\eclipse\jre\bin\javaw.exe\javaw.exe in your current PATH." Eclipse displays the same sentence when I try to open a ready workspace from the book "Java for dummies (7th Edition)" by Barry Burd, in which I am studying.
N.B.: This action was successful when I tried it for the first time this morning. But I do not know what I did then: I deleted many files (Java 8 and IntelliJ IDEA) and then downloaded the Java 9 once more. I really do not know.
So, please, would you help?
 
Junilu Lacar
Sheriff
Posts: 11493
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the ranch. If the action was successful this morning, what do you need help with then? Most likely, it was an issue with your initial PATH system variable which got resolved after reinstalling the JDK.
 
Carolina Dahfran
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Junilu Lacar wrote:Welcome to the ranch. If the action was successful this morning, what do you need help with then? Most likely, it was an issue with your initial PATH system variable which got resolved after reinstalling the JDK.


Dear Junilu Lacar,
The action was successful only once, and right now it is not at all. I tried  many things and it is still not working. I do not know how to solve this problem.
 
Dave Tolls
Ranch Foreman
Posts: 3061
37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"I deleted many files (Java 8 and IntelliJ IDEA)"

How did you delete your previous Java 8?
 
Carolina Dahfran
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave Tolls wrote:"I deleted many files (Java 8 and IntelliJ IDEA)"

How did you delete your previous Java 8?

I deleted them from the Desktop with the Delete button, then, I uninstalled them from the programs in the Control Panel.
 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
searching the following location: "C:Users\user\Desktop\eclipse-java-oxygen-R-win32-x86_64\eclipse\jre\bin\javaw.exe\javaw.exe

That is a very unusual path.  PATH should have the path to the bin folder that contains the java tools like javac.exe.  It does not include the tool itself.
What is the value of the PATH environment variable?
Enter a command prompt and enter:  PATH

To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'

Paste here.
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch again.

I presume you completed the installation process for the Java® download? As Norm has suggested, you must usually edit your PATH environment variable to enable the OS to locate Java, too.
 
Carolina Dahfran
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Norm Radder wrote:
searching the following location: "C:Users\user\Desktop\eclipse-java-oxygen-R-win32-x86_64\eclipse\jre\bin\javaw.exe\javaw.exe

That is a very unusual path.  PATH should have the path to the bin folder that contains the java tools like javac.exe.  It does not include the tool itself.
What is the value of the PATH environment variable?
Enter a command prompt and enter:  PATH

To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'

Paste here.[What is the value of the PATH environment variable?
Enter a command prompt and enter:  PATH

To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy']

Dear Norm,
You mean that I do this:
command prompt - Path - Edit the system environment variables - environment variables - ?? (what to choose here?) When I click on the upper left icon (which is: "environment variables") I don't get "Edit" to select it.
 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was trying to get you to display the contents of the PATH variable in a command prompt window and then copy what was displayed there and paste it here so we can all see what is in your PATH variable.
I was not talking about how to make any changes to the current value of the PATH variable.
 
Carolina Dahfran
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Norm Radder wrote:I was trying to get you to display the contents of the PATH variable in a command prompt window and then copy what was displayed there and paste it here so we can all see what is in your PATH variable.
I was not talking about how to make any changes to the current value of the PATH variable.


It is as follows:

Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\user>PATH
PATH=C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\x64\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Skype\Phone\;"%JAVA_HOME%\bin;";C:Users\user\Desktop\eclipse-java-oxygen-R-win32-x86_64\eclipse\jre\bin\javac\exe;C:\Users\user\AppData\Local\Microsoft\WindowsApps;

C:\Users\user>
 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This path does not look right.  It should end at the bin folder.  The java and exe at the end should be removed
C:Users\user\Desktop\eclipse-java-oxygen-R-win32-x86_64\eclipse\jre\bin\javac\exe;

Find the path to the javac.exe file and add it to the PATH.  It is usually in a bin folder.
For example you could change the above  to this:

C:Users\user\Desktop\eclipse-java-oxygen-R-win32-x86_64\eclipse\jre\bin\;


That (Desktop) is a unusual place to install programs.  I think its better to define your own folder and install products into it instead of on the desktop.

It is also interesting that the javac.exe file is in a folder below the jre folder.
 
Knute Snortum
Sheriff
Posts: 4279
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a note here that I was not able to get Java 9 to work with my Eclipse Oxygen, so I had to use Java 1.8.0_144.

I agree with Norm that your path should not contain this section: If you know how to edit the PATH environment variable, I would delete this.

You also should not have a section in your PATH that looks like this: Try editing that section so that it looks like this: Then check your JAVA_HOME environment variable to see if it is set correctly.  "Correctly" would be that it is set to the installation folder that you last installed Java to.  If you install to the default folder, JAVA_HOME should look like this:
But like I said, I wasn't able to get Eclipse to work with Java 9.  You may fare better.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!