[java] How to make Eclipse see jdk?

Started by
2 comments, last by Aldacron 18 years, 9 months ago
Hi, i've installed a new copy of windows xp, and as j2ee sdk comes with the jdk 5.0, I'm not installing the jdk by itself. SO basically I need to let eclipse see jdk eg the java.exe etc. I guess I'm suppose to somehow set the folder as something the command line, but i'm not totally sure on what to do. So does anyone know what to do? Thanks!
Advertisement
Three things:
1) goes in the java forum
2) why did you install the enterprise edition? The standard edition is more than adequate.
3) what are you going on about? "the jdk comes with the jdk, so I'm not installing the jdk"? Do you mean the JRE comes with the JDK, so you aren't going to install the JRE seperately? Because THAT would be correct.

After running the installer for the appropriate JDK, the latest versions (since atleast 1.4.1) automatically update the environment variables appropriately. On Windows XP you wouldn't update it on the command line anyway, the changes would be wiped out when you restart the computer.

Installing eclipse is just a matter of unzipping the package in the desired directory. Older versions used to have a problem with directories with spaces in their names, I don't know about new versions, I just always put it in C:/eclipse now.

Only Eclipse v3.1 supports Java 5. If you don't have Eclipse 3.1, then you won't be able to develop *using the new java 5 features*. Eclipse will think it's java 1.4 with a different version number (specifically 1.5).

I would uninstall J2EE, it's overkill unless you seriously plan on developing giant software projects for the military or banking institutions. Install J2SE.

All you should have to do is install j2se jdk, unzip eclipse, and your good to go.

[Formerly "capn_midnight". See some of my projects. Find me on twitter tumblr G+ Github.]

I bet the Java forum could help you with this a lot more than I can. Moved.
Quote:Original post by johnnyBravo
Hi, i've installed a new copy of windows xp, and as j2ee sdk comes with the jdk 5.0, I'm not installing the jdk by itself.


The J2EE sdk does not include the JDK. Just to make sure things haven't changed since the last time I downloaded it, I checked the website, and found in the what's new list for J2EE 1.4: Support for J2SE 5.0. This means it supports 5.0 features - it doesn't include the jdk.

There is an all-in-one bundle that includes the J2EE 1.4 SDK, samples, docs, and J2SE 5.0 - but the J2SE should still run its own installer and get set up in its own directory. Besides which, you don't need the JDK to use Eclipse as it has its own compiler. The minimum you need is the JRE just to run it, which you have the option of installing during the JDK install anyway. Eclipse should be able to pick up whatever java.exe you have on your system.

But, if you do have it installed and it simply isn't finding it (or if you ever want to specify a vm other than the default), you can do this from the command line (as per the eclipse documentation, a great source of information on how to set up and use eclipse):

eclipse -vm <vm path>

It needs to be the full path to the executable, for example:

eclipse -vm C:\j2sdk1.4.2_07\bin\javaw.exe

JDK 5.0 usually installs under C:\Program Files\Java\ by default (where the JREs have always installed).

If you wish to avoid opening a command prompt to do this you can create a desktop shortcut and enter it there.

This topic is closed to new replies.

Advertisement