Some ODF links

A collection of links related to the OpenDocument Format (ODF) and Java development:

Snow Leopard, Java 6, GWT and Eclipse

After upgrading to Snow Leopard, I experienced some well known issues in Java development: a) Java 5 has been removed from the computer and b) GWT doesn’t work anymore. While a) is not too bad (but not nice either), b) is a real pain. The reason why GWT doesn’t work is not caused by Apple, but the crappy implementation for a 32-bit runtime by Google. Luckily there is a way to work around this problem. The Lombardi blog has an entry explaining the reasons and what needs to be done.

In short: download the GWT source, patch the BootStrapPlatform class and make sure GWT is started in 32-bit mode.

In this solution I assume, you are using the Google Eclipse Plugin as described in the documentation.

Download the latest source from SVN: svn checkout http://google-web-toolkit.googlecode.com/svn/trunk/ trunk.
Find the class BootStrapPlatform (make sure it is the Mac OS X relevant class!).
BootStrapPlatform Class
Now, drag the class into your Eclipse project. Eclipse will show two errors: The package will be incorrect and the classes GraphicsEnvironment and Toolkit will be not validated. Fix both errors (“quick fix”, for the second error choose “Exclude ‘BootStrapPlatform.java’ from App Engine validation”.
Now change the method isJava5 to return true:


  private static boolean isJava5() {
      return true;
      // return System.getProperty("java.version").startsWith("1.5");
  }

Now change the run configuration of the project and add the VM argument -d32.
That’s it. But hopefully, Google will patch the GAE SDK soon.

Upgrading Maven on Mac OS X

Upgrading Maven on Mac OS X is generally nothing very special, but I’d like to summarize the steps I’ve done. Maybe it is helpful for users which are not so familiar with the Terminal application.

terminal_app

  1. First of all: start the Terminal application, located in the folder /Applications/Utilities/Terminal.app.
  2. Here you can find out which Maven version is currently running, by typing mvn -version. You will get some output starting with the Maven version number, such as: Apache Maven 2.0.9. The latest version of Maven is 2.2.1 by the time of writing this article, so you see there is the need to upgrade.
  3. Now you have to locate the mvn command in your file system. Type whereis mvn. The output will be the complete path of the executable: /usr/bin/mvn.
  4. This is most likely not the place where Maven is installed, but a symbolic link to the Maven executable of your system. To find out where this link refers to, type ln -sls -l /usr/bin/mvn (replace the path with your own mvn location). The output will look like this: lrwxr-xr-x 1 root wheel 37 2 Sep 22:39 /usr/bin/mvn -> /usr/local/apache-maven-2.0.9/bin/mvn
  5. Now change to the parent directory of the Maven installation. cd /usr/local
  6. Open Safari and download Maven from the Maven Homepage. Instead of downloading with Safari, you can also use a command line tool. Please use the mirror which is best for you: http://apache.linux-mirror.org/maven/binaries/apache-maven-2.2.1-bin.tar.gz
  7. Now extract the archive: tar -xzvf apache-maven-2.2.1-bin.tar.gz
  8. Optional: move the extracted archive to the right folder: sudo mv apache-maven-2.2.1 /usr/local
  9. Now link the Maven command to the new version: sudo ln -fs /usr/local/apache-maven-2.2.1/bin/mvn /usr/bin/mvn

That’s it. Now you can try if the latest version is actually installed. Type mvn -version again, and you will see:

Maven Version Output

If you are not able to execute the mvn command, it is possible that the execute flag is missing. Change this by typing chmod a+x /usr/local/apache-maven-2.2.1/bin/mvn