Sign in to follow this  
dxFoo

Eclipse won't work...

Recommended Posts

I finally want to check out Eclipse since a billion programmers told me to do so. So, I downloaded the big file (latest version), and I try to execute the .exe file. Error Message: JVM Launcher: Error: Could not find Java 2 Runtime Environment. An additional message reads: JVM terminated. Exit code=2 C:\WINDOWS\system32\javaw.exe -Xms40m -Xms256m -jar C:\eclipse\startup.jar -os win32 -ws win32 -arch x86 -launcher C:\eclipse\eclipse.exe -name Eclipse -showsplash 600 -exitdata 1a28_4c -vm C:\WINDOWS\system32\javaw.exe -vmargs -Xms40m -Xms256m -jar C:\eclipse\startup.jar Whew! Lots of typing there. This is really strange because I recently downloaded the JDK 1.5_04 which includes the JVM runtime. Any advice is great. Phil

Share this post


Link to post
Share on other sites
Make sure the Eclipse folder is in the C:\ directory or whatever your main directory is. I think I tried putting it in the program files folder once and it didn't work. Once I had it in the C:\ directory I got the .exe to run fine.

Share this post


Link to post
Share on other sites
It's 99% likely this is a problem with your JRE install and not with Eclipse. See if other Java apps/applets work for you. For example... try this. You shouldn't need to edit any system variables.

Share this post


Link to post
Share on other sites
Okay, try running Eclipse with this command line argument:

c:\eclipse\eclipse.exe -vm c:\jre\bin\javaw.exe

Of course, edit the paths to point to eclipse and the JRE, respectively. Try picking the one that didn't come with Windows.

From the Eclipse help file:

Quote:
It is recommended that you explicitly specify which Java VM to use when running Eclipse. This is achieved with the -vm command line argument (for example, -vm c:\jre\bin\javaw.exe). If you don't use -vm, Eclipse will use the first Java VM found on the O/S path. When you install other products, they may change your path, resulting in a different Java VM being used when you next launch Eclipse.


[Edited by - Kevinator on September 1, 2005 2:18:13 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Sailorstick
Make sure you have at least 2 gig of RAM installed to run Eclipse as well ;)


I'm running it fine on 512MB. ;)

Share this post


Link to post
Share on other sites
Quote:
Original post by Sailorstick
Make sure you have at least 2 gig of RAM installed to run Eclipse as well ;)


I'm running it fine on 192MB. :D

Share this post


Link to post
Share on other sites
When Java is installed to Windows, it is installed in the default path.

C:\Program Files\Java\jre1.5.0_04\bin

According to typing in that arguement & path, it still said it's not found. Due to Program Files having a space in it, it also says "Can't find C:\Program. What is the space character in dos? Every other Java IDE I use has no problem finding it by its default location, so I'm confused.

Share this post


Link to post
Share on other sites
I dos I believe you must put quotes around the path, like this: "c:\my documents\", and remember, it's not C:\Program Files\Java\jre1.5.0_04\bin, it's C:\Program Files\Java\jre1.5.0_04\bin\javaw.exe. So your new path becomes:

c:\eclipse\eclipse.exe -vm "c:\Program Files\Java\jre1.5.0_04\bin"

if your eclipse path has a space around it too, make sure to use the quotes.

Share this post


Link to post
Share on other sites
I'm still getting the 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:\Program Files\Java\jre1.5.0_04\bin

I checked the folders too and the file is in this path. :(

Share this post


Link to post
Share on other sites
Oh wow it worked :)

I added javaw.exe at the end of the string, and Eclipse loaded. When I close it, and double click on Eclipse's icon, it won't find the JVM. Is there a way I can change it so it always looks in this path?

Share this post


Link to post
Share on other sites
Quote:
Original post by dxFoo
Oh wow it worked :)

I added javaw.exe at the end of the string, and Eclipse loaded. When I close it, and double click on Eclipse's icon, it won't find the JVM. Is there a way I can change it so it always looks in this path?


Why not create a shortcut to launch Eclipse for you, and in the target field, add the text Kevinator gave you, adding javaw.exe onto the end?

Share this post


Link to post
Share on other sites
Small side question;


import java.awt.*;
import java.applet.*;

/*
<applet code="JavaApp" width=800 height=600>
</applet>
*/

public class JavaApp extends Applet
{
// ...


How come does the IDE ignore my comments above for the width/height? I'm using this.setSize() for now, until someone can help with that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this