Configuring Hidden, Invisible, or Whitespace Characters in The Eclipse Text Editor

The newer (I am currently using Mars, 4.5.0) versions of Eclipse provide very good tools for configuring the visibility of whitespace characters in code.

To customize your settings go to Window -> Preferences -> General -> Editors -> Text Editors.

On that page there will be checkbox option next to “Show whitespace characters (configure visibility).

Clicking on the ‘configure visibility’ link will allow you to choose what is shown and the opacity of the whitespace characters, which is a really → Continue reading “Configuring Hidden, Invisible, or Whitespace Characters in The Eclipse Text Editor”

Using the Eclipse Memory Analyzer (MAT) Remotely on Large Heap Dumps

Sometime your java applilcation will fail and generate an enormous heap dump.  One that may be too large to be able to transfer to your local machine and to analyze for lack of RAM, time or both.

One solution is to install the MAT tool on the remote server and generate an HTML output of the analysis to download and view locally.  This saves the headache of attempting to get X Windows installed on the remote machine and get all → Continue reading “Using the Eclipse Memory Analyzer (MAT) Remotely on Large Heap Dumps”

Debugging MapReduce MRv2 Code in Eclipse

Following is how to set-up your environment to be able to set breakpoints, step-through, and debug your MapReduce code in Eclipse.

All of the this was done on a machine running Linux, but should work just fine for any *nix machine, and perhaps Windows running Cygwin (assuming that you can get Hadoop and its naitive libraries compiled under Windows).

This also assumes that you are building your project with maven.

Install a pseudo-distributed hadooop cluster on your development box.  (Yes, → Continue reading “Debugging MapReduce MRv2 Code in Eclipse”

Configuring Eclipse to Replace Tabs with Spaces for Indentation

Following are two basic settings (I believe that there are other language specific, C++ for instance, settings as well).

 For Java:

Window->Preferences->Java->Code Style->Formatter->
Click on ‘New’ to create a new profile and select the profile that you want to copy
Then click ‘Edit’ and select ‘Spaces Only’ from the ‘Tab Policy’ dropdown.

You can further set the indentation and tab size.

For default text editor:

Window->Preferences->General->Editors->Text Editors->Insert spaces for tabs→ Continue reading “Configuring Eclipse to Replace Tabs with Spaces for Indentation”

Eclipse Android Development Error executing aapt: Cannot run program “/path/to/aapt”: error=2, No such file or directory: error=2, No such file or directory

Even though the ADT bundle provides a 64 bit version, the system requirements indicate that “64-bit distributions must be capable of running 32-bit applications.”  I failed to see that when installing it under Fedora Core 20 and was getting the following error from Eclipse:

Error executing aapt: Cannot run program "/home/rchapin/sdks/adt-bundle-linux-x86_64-20131030/sdk/build-tools/android-4.4/aapt": error=2, No such file or directory: error=2, No such file or directory  android_sdk    line 1   Android ADT Problem

I checked to see if the file was there.  Yep.  I → Continue reading “Eclipse Android Development Error executing aapt: Cannot run program “/path/to/aapt”: error=2, No such file or directory: error=2, No such file or directory”

Setting up Android in Eclipse, Unable to resolve target ‘android-18’

When setting up Eclipse for Android development, after you have installed the Develeper Tools and NDK Plugins and linked to the ADT-bundle and then imported your project (see othere posts related by searching for ‘android’) I got the following error:

[2014-03-24 14:14:53 - android_sdk] Unable to resolve target 'android-18'

I went and checked to make sure that the Platform.MinPlatformToolsRev property in the ~/path/to/adt-bundle-linux-x86_64-20131030/sdk/tools/source.properties matched that of my project.properties file.

They were both 18.  Eh?  Why the error?

So, in Eclipse, → Continue reading “Setting up Android in Eclipse, Unable to resolve target ‘android-18’”

Invalid Project Description, project path overlaps the location of another project with the same name When Importing Existing Android Project in Eclipse

I’ve got a new install of Eclipse and am setting up to do some Android development.

After getting the Develeper Tools and NDK Plugins installed and linking to the ADT-bundle that I downloaded, I was getting an error when attempting to import the existing project by going to File > Import > Android > Existing Android Code Into Workspace.

The error was:

Invalid project description /some/path/to/project/dir_name overlaps the location of another project: dir_name

After a few searches and a couple → Continue reading “Invalid Project Description, project path overlaps the location of another project with the same name When Importing Existing Android Project in Eclipse”

Eclipse Crashing with SIGSEGV, Problematic Frame libgdk and/or libsoup Problem Solved

I’m setting up a new workstation under Fedora Core 20 and getting my dev environment set up.

I had copied over my /opt dir from my old machine which included an older version of Eclipse (3.8.2) that I had been using.  That version wasn’t behaving very well and I decided to go with the latest and greatest stable version (Kepler, 4.3.1).

Unfortunately, Kepler was dumping core with the following error:

 A fatal error has been detected by the Java Runtime Continue reading “Eclipse Crashing with SIGSEGV, Problematic Frame libgdk and/or libsoup Problem Solved”

Setting Up Android SDK and Plugin in an Existing Install of Eclipse

To set up an existing install of Eclipse to do some Android development do the following:

  • Go to http://developer.android.com/sdk/index.html and look for and download the ADT bundle for your OS (in my case I was using Fedora Core 18 at the time)
  • Unpack it as the user that is going to be running Eclipse and/or after you unpack it make sure that your user has read/write/execute permissons for the files in this directory (obviously, you don’t need execute permssion for
Continue reading “Setting Up Android SDK and Plugin in an Existing Install of Eclipse”