setting Eclipse to point to JDK 1.5

For some reason Eclipse 3.4.2 I installed is always picking up the 1.6 JDK and bombing out even though I have 1.4.2 installed. How do I make Eclipse point to the 1.4.2 version I have? I see there is an eclipse.conf file and perhaps that’s where I make the setting? And which setting should I put there?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Not sure about the right way, but since I have multiple installs of
Eclipse (for different purposes) I have an init script for each in my
~/bin directory (named something appropriate so when I Alt+F2 they
auto-complete in an intuitive way for me) and those scripts look like the
following:

<quote>
export JAVA_HOME=/home/ab/apps/purpose0/jdk1.5.0_22/jre
export JAVA_ROOT=${JAVA_HOME}
export JAVA_BINDIR=${JAVA_HOME}/bin
export PATH=${JAVA_BINDIR}:${PATH}
cd /home/ab/apps/purpose0/eclipse
/home/ab/apps/purpose0/eclipse/eclipse
</quote>

Good luck.

On 04/21/2011 08:06 PM, imterpsfan2 wrote:
>
> For some reason Eclipse 3.4.2 I installed is always picking up the 1.6
> JDK and bombing out even though I have 1.4.2 installed. How do I make
> Eclipse point to the 1.4.2 version I have? I see there is an
> eclipse.conf file and perhaps that’s where I make the setting? And which
> setting should I put there?
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJNsWPeAAoJEF+XTK08PnB5TlUQAIcdnEh4gCL8jVP6/6R5cCRc
/+vEtT0WxQ4y+iAxqBxX8UxeYNHvGzPKHLpcJ6wElfWzhVcu37pwV/wOCNw+17RY
GT30U4R0xaJkXyLhwllFWKRuLSSOXh2t0HjOefc/ewQ9E3Bmd67Kq5MG+osBe6Gs
psPUXI+dG13Wxv2sIIzjIq3av5VWTb6lc+N4SCDeQmop1rhyAfno1xxvEAK2AqrE
i1rH9wX6PpoH0WiZ8D0K4w0PQEdMqWTP8oeirDPKfp4sRWVIf3k9o25eUQR+aQFQ
8PgxVpD0QqWMxLyyL5xPfjpyPVoOueeYtO2CMH5r9VhlpFtk+XuqQEGpJxkUJSyl
Jy2yrGNFtPZ3d5fjGcZVs0q8Bc+xbA65MqBAgdp85HzruDWctF/zH6N7zbEti1+L
xERxt/L5Tbc6100vDaTFetNYWw1Jxfp9Dy4WpwmldvTs4+JySYEbqNh5aZGU6kSW
cDdCGKs8+fvyjDatafAPiiLNx1UhS4eZLhMmlX/xWRP9DLyCprCrWPxCAvUPYAKt
xFB9fhry8NFOkS55CD9XlWPytD3gb/7tzJy6nfuJCrHRmo0mTSojhXyta9XrYBsl
7ePyAipaDgto+PYPwJWQfLV5LXmurmLtBHrOzVqMuYRAI3RoPS4GNk5HzeBWTGF7
lskuOIN1mW04B5XPjkmj
=3DTk
-----END PGP SIGNATURE-----

I found there’s a vm switch in the eclipse.config that might work. Otherwise, I’ll try your solution.

Use the update-alternatives subsystem.

How to point environ var to JDK?
Problem: Sun JDK, not JRE

HTH,
Tony

I used the -vm switch in the /usr/share/eclipse/eclipse.ini file to point to the correct jre that I wanted. This seems to work for me. Thanks for the other suggestions. I’ll keep these in mind.

I’m going through an old java book that’s using an old jdk, jre.