Install Eclipse and RadRails

By | 6th January 2016

Background

  • OS: Debian 8
  • JDK 1.8 already installed

Install Eclipse

Eclipse can be installed using apt-get (Resources 1)

> sudo apt-get install eclipse eclipse-jdt eclipse-cdt

Parameters are list of packages installed

  • eclipse – Extensible tool platform and Java IDE
  • eclipse-jdt – Eclipse Java development tools (JDT)
  • eclipse-cdt – C/C++ development tools for Eclipse IDE

The version installed is Eclipse 3.8 while the latest stable is 4.5 Mars (Resources 2). To install 4.5, either use the Eclipse installer (Resources 2) or download the required package (Resources 3) and unzip.

After installing Eclipse 4.5 Mars using the installer, start Eclipse and found a blank Welcome tab – which is very odd but no other error.

Install RadRails

Proceed to install RadRails (Resources 4) and restart Eclipse, got the “unable to load the Chromium browser” and “java.lang.NullPointerException” – that I got when I installed Aptana Studio previously.  Further inspection the Aptana Studio Start page, there is an issue with the embedded browser – stack trace

No more handles [Browser style SWT.MOZILLA and Java system property org.eclipse.swt.browser.DefaultType=mozilla are not supported with GTK 3 as XULRunner is not ported for GTK 3 yet]
org.eclipse.swt.SWTError: No more handles [Browser style SWT.MOZILLA and Java system property org.eclipse.swt.browser.DefaultType=mozilla are not supported with GTK 3 as XULRunner is not ported for GTK 3 yet]
at org.eclipse.swt.SWT.error(SWT.java:4517)
at org.eclipse.swt.browser.MozillaDelegate.<init>(MozillaDelegate.java:57)
at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:663)

Note the message “mozilla are not supported with GTK 3 as XULRunner is not ported for GTK 3 yet”. (XULRunner is the run time engine for Mozilla family browser and GTK is a widget toolkit for creating GUI and it is used by XULRunner). Resources 5 and 6 confirms that GTK 3 is used by Eclipse 4.5 Mars so the issue is caused by XULRunner does not work with GTK 3.

The standalone Aptana Studio is based on Eclipse 4.3 and it is using GTK 2 (Resources 6) hence not impacted by the issue.

To workaround the problem (Resources 7), set environment variable SWT_GTK3 to 0

export SWT_GTK3=0

to tell Eclipse to use GTK 2 instead.

Resources

  1. http://www.cyberciti.biz/faq/debina-linux-installing-eclipse-jdt-eclipse-cdt-packages/
  2. http://wiki.eclipse.org/Eclipse/Installation
  3. https://eclipse.org/downloads/
  4. http://www.aptana.com/products/studio3/success_plugin.html
  5. https://www.eclipse.org/swt/faq.php#gtkversion
  6. https://www.eclipse.org/swt/faq.php#gtkstartup
  7. https://coffeeorientedprogramming.wordpress.com/2014/10/27/how-to-tell-if-you-are-running-eclipse-on-gtk2-or-on-gtk3/

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.