Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Eclipse does not found JDK (again, I know)(Cannot run Eclipse, JDK not found)
Eclipse does not found JDK (again, I know) [message #964409] Tue, 30 October 2012 13:45 Go to next message
Leo DP is currently offline Leo DPFriend
Messages: 2
Registered: October 2012
Junior Member
Hi all,
I have tried everything I have found on the net but I am not able to run Eclipse. What is the problem?

Error message:
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 locations: C:\SW\ANDROID\eclipse-jee-juno-SR1-win32\eclipse\jre\bin\javaw.exe javaw.exe in your current PATH

System:
64bit, Windows 7, latest updates installed (as of 30th Oct 2012)

Eclipse versions tried:
Eclipse Classic 4.2.1 and Eclipse IDE for Java EE Developers.
Java versions tried:
jdk-7u9-windows java_ee_sdk-6u4-jdk7-windows jdk-6u37-windows jdk-7u9-windows

Other combinations:
1) installed both Eclipse and Java for 64bit or for 32bit, removing the previous installation with the Win7 Control Panel SW management tool (what's its name)
2) rebooted the PC after installing Java, before running Eclipse
3) added to PATH the path of jdk or of jre (including the bin directory)
4) edited eclipse.ini adding -vm and the path to java.exe or javaw.exe
5) renamed java.exe to java2.exe
6) probably something else

Any idea?
leo
Re: Eclipse does not found JDK (again, I know) [message #964518 is a reply to message #964409] Tue, 30 October 2012 15:34 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 10/30/2012 8:41 AM, Leo DP wrote:
> Hi all,
> I have tried everything I have found on the net but I am not able to run
> Eclipse. What is the problem?
>
> [snip]
There are many different ways to set up Eclipse. Here is how I do it,
step-by-step. Ignore what doesn't apply to Android programming. Unless
you want to write web applications, I advise using Eclipse IDE for Java
Developers.

http://www.javahotchocolate.com/tutorials/eclipse-summary.html
icon14.gif  Re: Eclipse does not found JDK (again, I know) [message #965437 is a reply to message #964518] Wed, 31 October 2012 08:24 Go to previous messageGo to next message
Leo DP is currently offline Leo DPFriend
Messages: 2
Registered: October 2012
Junior Member
Thanks Russel, that did not help, I was already following that guide.
However, now I could get it.
The thing that worked was running at the command line (inside eclipse directory):

eclipse -vm "C:\Java\jdk1.7.0_09\bin\javaw.exe"

the same -vm argument inside eclipse.ini does not seem to be accepted, even if I add the jdk path to PATH or as a new environment variable JAVA_PATH
below I paste my eclipse.ini and I write the last tests I have which did not help, just for documentation.

eclipse.ini
-startup
plugins\org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m




---------------------------------
Without success I had also tried:

7) run Eclipse and/or javaw and/or java as admin
Cool make a symbolic link inside [eclipse installation directory]/jre pointing to jdk directory, same name
9) editing eclipse.ini in the parameter -Dosgi.requiredJavaVersion=1.7 and changing "\" with "/" in the paths like "-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813"

If I run eclipse through the command line I get the error message:
Error: Could not create the Java Virtual Machine
Error: A fatal exception has occurred. Program will exit

then: Java was started but returned exit code=1
which means that the executable has been found, if I understand correctly.

Re: Eclipse does not found JDK (again, I know) [message #965819 is a reply to message #965437] Wed, 31 October 2012 14:24 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 10/31/2012 2:24 AM, Leo DP wrote:
> Thanks Russel, that did not help, I was already following that guide.
> However, now I could get it.
> The thing that worked was running at the command line (inside eclipse
> directory):
>
> eclipse -vm "C:\Java\jdk1.7.0_09\bin\javaw.exe"
>
> the same -vm argument inside eclipse.ini does not seem to be accepted,
> even if I add the jdk path to PATH or as a new environment variable
> JAVA_PATH
> below I paste my eclipse.ini and I write the last tests I have which did
> not help, just for documentation.
> [snip]

I'm glad you're up and running. Did you separate the path and the -vm
option across two lines? If not it would be ignored:

-vm
C:\Java\jdk1.7.0_09\bin\javaw.exe

I'm pretty sure Eclipse doesn't care about JAVA_PATH, JAVA_HOME, etc. or
PATH.

Best of luck to you.
Re: Eclipse does not found JDK (again, I know) [message #1831800 is a reply to message #965819] Sat, 29 August 2020 23:37 Go to previous message
Xiao Luo is currently offline Xiao LuoFriend
Messages: 1
Registered: August 2020
Junior Member
Hi, just ran into the same issue. If you try putting the following lines on the very top of the `eclipse.ini` file (above the "-startup"), it'll probably work (worked for me).
Quote:

-vm
C:\Program Files\Java\jdk-14.0.2\bin

Previous Topic:2020-06 "dependencies " errors
Next Topic:Can't run Spring Starter Project
Goto Forum:
  


Current Time: Thu Mar 28 20:31:34 GMT 2024

Powered by FUDForum. Page generated in 0.03868 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top