Running 32bit Eclipse on 64bit Linux

The release notes for Flex Builder Linux don't match what I had to do to get 32bit Eclipse running on my 64bit Linux install, so here are the steps I took. They don't cover installing the (debug) Flash player into a 32bit version of FireFox, as this is well covered elsewhere.

  1. Install a 32-bit Java run time.
    Use the 'self extracting file' rather than RPM so as to avoid mucking up any installed 64bit JVM. If you have the Java plug-in working in your 32bit web browser (the one you use with the 32bit Flash player), you could just use that install, but grabbing the most recent JVM is always a good start.
    I installed this to '/opt/jre<version>'
  2. Installed the 32-bit WTP all in one version of Eclipse 3.3 (wtp-all-in-one-sdk-R-2.0-200706260303-linux-gtk.tar.gz).
    Any Eclipse 3.3 version should work, but the WTP comes pre-bundled with all sorts of useful extras.
    I installed this to '/opt/eclipse-i386'
  3. In the eclipse.ini for the 32-bit eclipse, add '-vm ' and the path to your 32-bit JRE after the 'org.eclipse...' line, i.e.:
    -vm /opt/jre1.6.0_02-i386/
  4. Create an eclipse.sh file in the 32bit Eclipse install directory.
    This is to set up some environment settings so that Eclipse finds the 32bit JVM, and Flex Builder:
    export PATH=/home/chivertont/Adobe_Flex_Builder_Linux/Player/linux/:/opt/jre1.6.0_02-i386/bin:$PATH
    export JAVA_HOME=/opt/jre1.6.0_02-i386/
    export MOZ_PLUGIN_PATH=/usr/lib/browser-plugins/
    cd /opt/eclipse-i386
    ./eclipse $*
  5. Check eclipse starts by running './eclipse.sh'.
    'file eclipse' should report 'eclipse: ELF 32-bit LSB executable, Intel 80386'
  6. Open a shell and run the same 'export' lines.
    'which java' should report your 32bit install. If not, fix the paths in the export lines (and in the eclipse.sh script).
  7. From this shell start the Flex Builder Linux installer.
    Make sure it's install path matches up with the 'export PATH' line above.
  8. Once installed, change the final line of the .../Adobe_Flex_Builder_Linux/Adobe_Flex_builder.sh script to use the eclipse.sh file we made earlier rather than the current "${ECLIPSE_LOCATION}"/eclipse:
    "${ECLIPSE_LOCATION}"/eclipse.sh ......

From now on, use the Adobe_Flex_builder.sh script to start Eclipse as it sets some other environment and start up options.

If you need to add start up options to Eclipse, remember that in eclipse.sh "$*" will expand to "-vmargs ..." so you should take that into account, if you need to add more PermGenSpace:

./eclipse $* -XX:PermSize=64M -XX:MaxPermSize=128M

or a "-clean":

./eclipse -clean $*

There should be no problem using the same 'workspace', but I created a new one and then right-clicked in the (empty) project navigator and picked 'import' just to be safe.

You will need to reinstall all your plug-ins (CFEclipse, Subversion etc.) or continue to use your existing 64bit Eclipse for non-Flex work.

Don't forget to update your Flash player to the latest debug version (included with Builder) - you can check that it works OK by visiting http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19245&sliceId=1

Also, check the Flex Builder Linux release notes on Labs for setting up the 'defaut browser' and point that at your 32bit FireFox (or other browser if it works with Flash Player 9).

You can export your 64-bit Eclipse's settings  (if you have one) from the File menu's 'export' option, under 'General', and then reimport them into your new 32-bit Eclipse.

Ideal solution

Still wtp-all distro is not available for 64-bit linux. This solution is great. Thanks for the detailed explanation.

Cheers!

Missing -vmargs when launching eclipse

If you are using {$>./eclipse} to launch eclipse, then you might run into some issues like "Out of memory error"... Assuming you are working with large projects, its good to set the maximum memory settings for all the other errors to not crop in.

Please use "$>./eclipse -vmargs -Xmx512m" to set the maximum memory setting to avoid OOM errors. Or you can always use the shell script, "$>Adobe_Flex_builder.sh" which sets this (along with setting the FP path, Moz_Plugin path etc.)

Cheers Arun, I actaully do

Cheers Arun, I actaully do do more-or-less the latter.

I've updated the last point of the list of instructions to match.

Tom

Great! Working on Ubuntu

Great! Working on Ubuntu 7.10 amd64 Gutsy Gibbon.
Cheers!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
topical-homopterousif you are reading this, don't click it as it will mark you as a spammer
if you are reading this, don't click it as it will mark you as a spammer