Eclipse error: "javaw.exe not found" - eclipse

I installed Python 2.7 recently and with it Django--as part of the installation I had to add a PATH environment variable with the path to my Python installation.
After I did that, when I launch Eclipse, I get an error saying "javaw.exe" was not found. I need both Python and Eclipse on my machine, is there something I can do to fix this issue?

Have you installed java runtime? If not, you need to install it first. If you have it already, you might need to adjust your path.

You need to use
java.exe
Launch it with the following command
\eclipse.exe -vm \bin\java.exe -vmargs -Dcom.sun.management.jmxremote
Look at the FAQ section of PyDev

Related

Eclipse (No JVM was found)

Eclipse gave me an error specifying that no JRE is installed while I was trying to configure Erlide in eclipse.
I added path to erlang directory in 'System Variables'. Then I installed erlang plugin for eclipse, added erlang installation directory path in Eclipse preferences and restarted Eclipse.
After restarting eclipse started giving me error about JRE.
Below steps might help you to solve your problem.
Install JDK and JRE - Here are step by step Instructions OR ANOTHER
Verify you setup JAVA_HOME and JRE_HOME and PATH into environment variable.
You can also investigate your Java version via Command Prompt:
Open a Command Prompt (Navigate to “Start” => “Run” and type “cmd”)
Then enter the following command:
java –version
If you don't see your java version you have to follow step 1 carefully again
Installed eclipse/ if already installed open the same. Here are step by step Instructions
NOTE: Make sure that you have same bits for both JDK and EClipse (32 or 64). One way is to verify in your ini file.
To develop a Java program, you need a JDK not only a JRE.
Do you have a JDK installed? Have you tried to run jar, $ set | grep "JAVA_HOME" (Linux) or C:\> set | find "JAVA_HOME" (Windows) in your command prompt to see if you have Java configured in your machine?
Once you install your JDK you need to set this environment variable.
Maybe Earlide is not compatible with your JDK 1.8, can you try with jdk 1.6

Eclipse JRE or JDK missing

I am trying to use Eclipse on a friends computer but we keep getting this when we run Eclipse
We have the environmental variable set as well.
Edit
it was working before he installed the black berry plug in.
The variable JAVA_HOME is not required by Eclipse. If your Java installation does not put the Java executables in the PATH, you should add those manually.
A faster way to have your Eclipse up and running consists in modifying the eclipse.ini and using the -vm option.
http://wiki.eclipse.org/Eclipse.ini#-vm_value:_Windows_Example
I had the same problem. For me, I needed the JDK. So I had to install the JDK. It should match the build platform that is, 64bit vs. 32bit windows. After that, I removed, the -vm line from the eclipse.ini file (the suggested fix). It was giving me the "Can't create virtual machine" error. The current release of JDK is version, 7 whereas the Android Developers Toolkit version of eclipse is currently based on JDK 6. But it seems to work. Eclipse came up and is functional. Haven't actually written a program yet.
Go to eclipse folder (where eclipse is installed) and open eclipse.ini file in your editor and add the following code after openFile tag.
-vm C:\Program Files\JDK6\bin\javaw.exe
That's all.
I had a similar problem, since our Java and JDK is consistently updated by our service desk, including uninstalling old JDKs. They take care of the PATH for us, but then the JRE that Eclipse was used to "seeing" was gone. So, the thing that has worked best for me is to modify the shortcut's "target" from:
"C:\Program Files\Eclipse\Eclipse IDE for Java EE Developers\eclipse.exe"
to
"C:\Program Files\Eclipse\Eclipse IDE for Java EE Developers\eclipse.exe" -vm "C:\Program Files\Java\<jdkver>\jre\bin\javaw.exe"
That will point Eclipse toward to the JRE in the JDK you want it to use, and then you can update that shortcut when your JDK updates.
This is on Windows 64bit, obviously.
It can also happen on mismatch of JAVA and Eclipse bit version.
for eg:
If in your System java is 32 bit and you are trying to install Eclipse of 64 bit then the same situation might occur.
Because Eclipse will look Java in Program Files while at the same time Java may be present in Program Files (x86).
So in this case eclipse will not get java and throw the same error.
While installing eclipse, Jre missing :
I solved my error as follows:-
This error may comes if you have 2 program files folder in your system.
"Program files" &
"Program files x86".
Please install JDK&JRE in the "Program files" folder.
Hope your jre missing error get solved.
this works for me:
open eclipse.ini file in your editor and add the line: -vm C:\Program Files\JDK11\bin\javaw.exe
update system PATH with correct JDK path.

Eclipse startup error : JRE/JDK must be available

Downloaded latest eclipse for Java EE
Opened... error .. opening...JRE/JDK must be available for running eclipse..
Unlike normal my java is installed in G:/
Do I have to make any changes to ecplise.ini in -vm tag ?
Like adding java jdk bin path ?
Did not work somehow !
Any idea ?
Eclipse looks at PATH variable for choosing which JRE to use, if that is configured eclipse will work correctly, if you don't have or want to point eclipse to a specific Java Installation then you can provide following argument in eclipse.ini
-vm
G:\Java
You can see different runtime options available here.
You can start Eclipse by running eclipse.exe on Windows or eclipse on other platforms. This small launcher essentially finds and loads the JVM. On Windows, the eclipsec.exe console executable can be used for improved command line behavior.
Alternatively, you can launch Eclipse by directly invoking the JVM as follows:
java -jar eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070606.jar
NOTE: The version of org.eclipse.equinox.launcher in the above command must match the version actually shipped with Eclipse. For more details on launching Eclipse using Java (not eclipse.exe) with the launcher, see Starting Eclipse Commandline With Equinox Launcher.
Find the JVM
If a JVM is installed in the eclipse/jre directory, Eclipse will use it; otherwise the launcher will consult the eclipse.ini file and the system path variable. Eclipse DOES NOT consult the JAVA_HOME environment variable.
To explicitly specify a JVM of your choice, you can use the -vm command line argument:
eclipse -vm c:\jre\bin\javaw.exe ''start Java by executing the specified java executable
eclipse -vm c:\jre\bin\client\jvm.dll ''start Java by loading the jvm in the eclipse process
See the launcher page for more details on specifying a JVM.
eclipse.ini
The most recommended way to specify a JVM for Eclipse to run in is to put startup configuration into the eclipse.ini file in the same folder as the Eclipse executable (eclipse.exe on Windows). The Eclipse program launcher will read arguments from either the command-line or the configuration file named eclipse.ini. To specify a JVM using configuration file, include the -vm argument in eclipse.ini, for example:
-vm
c:/jre/bin/javaw.exe
Note: there are no quotes around this path as would be required when executing the same from the command-line were the path to contain white space, etc. This is a common mistake when using Windows.
Eclipse now will launch without additional arguments in the command-line, with the JVM specified in the eclipse.ini configuration file.
You should always use -vm so you can be sure of what VM you are using. Installers for other applications sometimes modify the system path variable, thus changing the VM used to launch Eclipse without your knowing about it.
The format of the eclipse.ini file is very particular; it is strongly recommended to read eclipse.ini and follow the examples there.
When Eclipse starts, you are prompted to choose a workspace location on start-up. This behavior can be configured in the Preferences. You can manually specify the workspace location on the command line, using the -data command-line argument.
OLD: Starting Eclipse 3.2
In Eclipse 3.2 and earlier, there was an additional file in the root of Eclipse: startup.jar. This jar file contained the classes needed to start the platform. In 3.3 and above the equivalent classes are in the org.eclipse.equinox.launcher bundle.
To start 3.2 by directly invoking the JVM use the following command:
java -cp eclipse/startup.jar org.eclipse.core.launcher.Main
Eclipse 3.2 did not contain a console version of the executable.
OLD: Oracle/Sun VM 1.6.0_21 on Windows
The Eclipse 3.3 - 3.6 launchers for Windows had a problem with the Oracle/Sun Java VM version '1.6.0_21-b06'.
UPDATE: Oracle/Sun have released a respin of their JDK/JRE to fix this, so the recommended resolution of this problem is to download and re-install version 1.6.0_21-b07'. Make sure you have b07 or higher by running java -version.
Before the fix was released, there were three choices to work around this:
1----switch back to '1.6.0_20' (as of July 19, 2010 it can still be downloaded here)
Change the commandline for launching or add the following line after "-vmargs" to your Eclipse.ini file:
-XX:MaxPermSize=256m
(Detailed instructions/examples)http://wiki.eclipse.org/Eclipse.ini
2----For 32-bit Helios, download the fixed eclipse_1308.dll and place it into
(eclipse_home)/plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503(https://bugs.eclipse.org/bugs/attachment.cgi?id=174640)
{The Java bug was closed for voting and comments at 6969236 on the Java BugParade because the change has been reverted; the related Eclipse bug report is open for voting and comments at bug 319514.}

problem running eclipse on ubuntu?

I downloaded eclipse on ubuntu. But when I run it it show following error.
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:
/home/awan/eclipse/jre/bin/java
java in your current PATH
Can someone help me to solve this. I don't have experience about this on ubuntu.
thanks
You need to install either the openjdk-7-jre or oracle-java7-jre package.
sudo apt-get install openjdk-7-jre
Note that openjdk-7-jre is easier to install, because it's available via the standard Ubuntu repository, whereas you have to build oracle-java7-jre yourself using java-package.
If you allready installed java** you need to add the Java-Path to your eclipse.ini
in my case it's located at:
/usr/lib/eclipse/eclipse.ini
there you need to add direct under the "openFile" statement, where you replace the path with your java path:
-vm
/usr/lib/jvm/java-7-openjdk/bin/java //!replace with your path to java!
** check wether java is installed by typing the commands
java -version
or
javac -version
If you are sure that java is installed, but it's not found you may have multiple versions installed, check that by:
sudo update-alternatives --config java
and select installation first
I solved it by created a symbolic link java in /usr/bin that points to the VM.
Steps :
Downloaded the appropriate version of Oracle's JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html?ssSourceSiteId=otnjp
extract it to any folder. For example :
tar zxvf ~/Downloads/jdk-8u5-linux-x64.tar.gz ~/DEV
create symbolic link with name java :
cd /usr/bin
ln -s ~/DEV/jdk1.8.0_05/bin/java java
You need to add the JDK to your PATH.
This link should help you get started.
You need to install the JDK or OpenJDK (Eclipse only officially supports the former, but the latter mostly works).
I solved this error message by adding jre path in to eclipse.ini.To solve the error like this,your machine should have java installed.
In my setup eclipse.ini is in
eclipse-jee-mars-linux-gtk-x86_64-5.0.0/eclipse folder.
Add,
-vm /home/user/Documents/Softwares/jdk-8u202-linux-x64/jdk1.8.0_202/jre/bin
at the top of the file.
In here /home/user/Documents/Softwares/jdk-8u202-linux-x64/jdk1.8.0_202 is my JAVA_HOME
For me, directing JDK path to -vm didn't work.I had to put the jre/bin path which is inside jdk folder.
You need to have a Java environment that can execute the Java instructions in Eclipse for it to run.
Install a suitable Java package in the package manager, and try again. Note that Eclipse does not require a JDK, a JRE is enough.
I tried editing .profile, .bashrc, to no avail. (I'm trying to use eclipse by clicking an icon, NOT by executing it from a bash shell).
SOLUTION: I copied my /home/denise/jdk1.7.0_25/jre to
/home/denise/dev//jre
which is a stupid solution because it defeats the purpose of having a .profile or .bashrc.
and no, there was no .pam_environment file
peace!
I had similar problem. It solved after, I have download JRE from http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
and put it in the path of eclipse as shown below -
abc#ubuntu:~/Downloads/eclipse$ ls
about_files
configuration
eclipse.ini
icon.xpm
p2
about.html
dropins
epl-v10.html
jre
plugins
artifacts.xml
eclipse
features
notice.html
readme
I hope it helps.
First of all you need to set your JAVA path in .bashrc file.
goto cd ~
open .bashrc,vi .bashrc
add a line at the end export path="path/to dir:$path"
do source .bashrc for changes to take effect.
Then open your eclipse.ini file(if you want to locate eclipse.ini do whereis eclipse).
open eclipse.ini,then add a line
-vm
"path/to/bin/of/open-jdk"
Just copy jre and paste in eclipse folder that's it. After this just click on eclipse icon to launch eclipse. Thanks.
artifacts.xml
configuration
dropins
eclipse
eclipse.ini
features
icon.xpm
jre
p2
plugins
readme

Eclipse will not start after uninstalling Java and reinstalling to a new location

I reinstalled the JDK tonight because of the embedded space in Program File... and now Eclipse blows up immediately when starting. Is there a config file that needs updating? I tried eclipse -clean with nu luck.
while eclipse starting it requires java.exe and javaw.exe. so when you installed it at other places. you should specify its location in PATH variable so that it can be used to locate your JVM.
EDIT: and of course remove the old entry.
I know this question has already been solved but i want to share a small detail. if you are using -vm option in eclipse.ini, make sure that it is written before -vmargs option.
in my case below configuration didn't worked
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-vm
C:\ibm_jdk_6\bin\javaw.exe
but below configuration worked
-vm
C:\ibm_jdk_6\bin\javaw.exe
-vmargs
What OS are you using? You need to let eclipse know where your jdk lives. On windows at least it is in the exclipse.ini, change it to put to your knew jdk and it will work
for example on windows you will need something like this in your eclipse.ini
-vm
C:\jdk1.6.0_02\jre\bin\java
You can find your eclipse.ini in the root directory of your eclipse installation (ie: where eclipse.exe is)
You must have fixed this problem by now but I don't see anything in this thread to indicate that.
I just had the same problem. I updated JDK. The next time I tried to start Eclipse it wouldn't. I fixed the problem by removing all older versions of java and setting the new version in my PATH system environment variable. Actually, I also reinstalled my eclipse but I don't think that had anything to do with the solution. By the way, I'm using Eclipse Galileo (Build id: 20090621-0832) and jdk1.6.0_021.
did you eclipse.ini file in the eclipse directory point to a specific -vm? You may need to change it in your eclipse directory.
You can also get this error if you have a 64-bit jre and 32-bit eclipse, so just make sure your jre and eclipse build match up!
Use the eclipse clean command; it will make clean and elipse will start
GOTO_Eclipse_Directory > eclipse -clean
Refer below url : http://www.coderanch.com/t/454501/vc/eclipse-exe-not-working
Pre append the string in system variable PATH: "C:\Program Files\Java\jdk1.6.0_22\jre\bin;"
Then every thing will work fine.
For me Eclipse was not starting because I had two versions of Java 5 & Java 6 installed. I uninstalled 6, and then it started working. So better to see if uninstallation of one version solves the problem.
I got the same problem When i Installed the java update 38....
resolved by uninstalling the update.
Eclipse was able to locate the JRE however it failed to launch because the eclipse that I had downloaded was 32 bit and my jdk version was 64bit. I uninstalled 64bit jdk and installed 32bit. Eclipse launched successfully
You don't have to uninstall anything. Just go to the eclipse folder in the eclipse configuration setting and change the class path to C:\Program Files\Java\jdk-9.0.1\bin.