Eclipse Android FAQ: How to set up your Eclipse Android development environment

Eclipse Android FAQ: How to set up the Eclipse Android development environment, including the Eclipse ADT and Android SDK.

After a little digging around I figured out how to install an Eclipse Android development environment, and I thought I'd share my installation notes here. The notes are a little shorter than my usual detailed explanations, but hopefully they're long enough.

To get the Android development environment working with Eclipse, you need to install two components onto your development system:

Perl: How to access shell environment variables through Perl associative arrays

Perl shell environment variables FAQ: How can I access Unix shell environment variables from a Perl script?

One of the great features of the Perl language is it's support of associative arrays. Unlike normal arrays, whose subscripts can only be integers, the subscripts of associative arrays are text strings. This may not sound like much yet, but with associative arrays (or hashes as they're now called) we can create fairly complex data structures with Perl.

How to list Perl CGI environment variables

Perl CGI environment variables: How can I print all of the Perl CGI environment variables? I'd like to see what CGI environment variables are available, and what their values are.

Somewhere in my history of working with Perl and CGI programs, I decided I needed a program that would simply print all of the CGI environment variables that my Perl programs were aware of. I can't remember if it was curiosity or what, but I decided that I needed a CGI program that did nothing else but print the environment variables it knew of.

How to determine if your Java application is running on Mac OS X

If you're developing a Swing/Java application to run on multiple platforms, at some point you'll probably have to make some tweaks for each operating system. Yes, there are differences in Swing behavior between Mac OS X, Linux, and Windows, and you'll want to account for those.

Perl environment variables - How to access Perl environment variables

Here's a quick example program that demonstrates how to access environment variables from within your Perl programs:

# environment variables are held in the %ENV hash
foreach $key (sort keys %ENV)
  print "$key is $ENV{$key}\n";

Using this simple Perl foreach loop, here's a subset of the output this script prints on my MacBook Pro:

Java - Getting the hostname on Windows Server 2003

Funny, this seems about five years late, but using Java, if you want to get the HOSTNAME on Windows Server 2003 (and possibly any version of Windows 2000), you have to do a little extra work. The environment variable you need to access on those versions of Windows is referred to as COMPUTERNAME, so in my case, since my software is going to be running on a lot of different (and currently-unknown) computer systems, I created a little convenience method to handle this problem.

How to determine the directory your Java application was started in (user.dir)

If you ever need to determine what directory your Java code is being run from (essentially the current working directory), you can get this information from the system properties, specifically the System.getProperty or System.getProperties methods.

The following line of Java code shows how to determine what directory your Java application was started in. This information is stored in the user.dir system property, which you access like this:

Java FAQ: How to print system environment variables

Java FAQ: How do I print system environment variables from a Java application?

Here's a source code example that shows how to print system environment variables from a Java program:

How to print all the Java system properties

The other day, when I was trying to compile all the Tame Swing examples, I had a problem running one of the examples. The problem was that I was running the example in Eclipse, and I was getting an error message showing the Eclipse (the JVM really) couldn't find the icon image files.