<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nils Preusker &#187; OS X</title>
	<atom:link href="http://www.nilspreusker.de/category/os-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nilspreusker.de</link>
	<description>Pragmatic Technologist</description>
	<lastBuildDate>Tue, 23 Mar 2010 10:44:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SVN + OS X + &#8220;Umlaute&#8221;</title>
		<link>http://www.nilspreusker.de/2010/03/23/svn-os-x-umlaute/</link>
		<comments>http://www.nilspreusker.de/2010/03/23/svn-os-x-umlaute/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 10:44:19 +0000</pubDate>
		<dc:creator>nils</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Unicode]]></category>

		<guid isPermaLink="false">http://www.nilspreusker.de/?p=333</guid>
		<description><![CDATA[The Mac OS file system —Mac OS Extended (Journaled)— stores umlaut characters as two separate letters (i.e. &#8216;a&#8217; and &#8216;¨&#8217;). This is referred to as NFD or Normalization Form D with canonical decomposition (see &#8220;Unicode Standard Annex #15 &#8211; Unicode Normalization Forms&#8221;, http://unicode.org/reports/tr15/#Norm_Forms).
This behavior can have unfortunate side effects in applications. Especially remote applications that work [...]]]></description>
			<content:encoded><![CDATA[<p>The Mac OS file system —Mac OS Extended (Journaled)— stores umlaut characters as two separate letters (i.e. &#8216;a&#8217; and &#8216;¨&#8217;). This is referred to as NFD or Normalization Form D with canonical decomposition (see &#8220;Unicode Standard Annex #15 &#8211; Unicode Normalization Forms&#8221;, <a href="http://unicode.org/reports/tr15/#Norm_Forms" target="_blank">http://unicode.org/reports/tr15/#Norm_Forms</a>).</p>
<p>This behavior can have unfortunate side effects in applications. Especially remote applications that work path based and interact with different operating systems can run into problems here.</p>
<p>I came across this when I tried to access a subversion repository that contained file names with German umlauts from my Mac. I am running subversion 1.6.5 and when I check out a file with an umlaut in its name, executing &#8220;svn stat&#8221; will list the file twice, once as missing (with an &#8216;!&#8217;) and once as unversioned (with a &#8216;?&#8217;). A search in the collabnet discussion forums finally confirmed that this is a know issue. The following links provide some documentation:<br />
<a href="http://www.opensimwiki.net/index.php/SVN" target="_blank">http://www.opensimwiki.net/index.php/SVN</a><br />
<a href="http://svn.apache.org/repos/asf/subversion/trunk/notes/unicode-composition-for-filenames" target="_blank">http://svn.apache.org/repos/asf/subversion/trunk/notes/unicode-composition-for-filenames</a></p>
<p>However, the subversion issues are just one specific bug. For application developers it is important to know that Unicode equivalence is a term to keep in mind. The wikipedia article (<a href="http://en.wikipedia.org/wiki/Unicode_equivalence" target="_blank">http://en.wikipedia.org/wiki/Unicode_equivalence</a>) mentions a bug in the samba protocol due to different representations of Unicode characters.</p>
<p>So, next time you come across an issue that involves a Mac and umlauts, <strong>Unicode equivalence</strong> might be the term to look for.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nilspreusker.de/2010/03/23/svn-os-x-umlaute/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse on Snow Leopard (10.6.2)</title>
		<link>http://www.nilspreusker.de/2009/11/24/eclipse-on-snow-leopard-10-6-2/</link>
		<comments>http://www.nilspreusker.de/2009/11/24/eclipse-on-snow-leopard-10-6-2/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 08:22:57 +0000</pubDate>
		<dc:creator>nils</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[eclipse]]></category>

		<guid isPermaLink="false">http://www.nilspreusker.de/?p=300</guid>
		<description><![CDATA[When I downloaded and installed Eclipse (eclipse-SDK-3.5.1-macosx-carbon.tar.gz) yesterday, I started to get the following error message:
To fix this, you need to go to &#8220;Preferences &#62; General &#62; Capabilities&#8221; and check &#8220;Classic Update&#8221;. Afterwards you should be able to select &#8220;Help &#62; Software Updates &#62; Find and Install&#8230;&#8221;.
I wasn&#8217;t able to find much on the internet, [...]]]></description>
			<content:encoded><![CDATA[<p>When I downloaded and installed Eclipse (eclipse-SDK-3.5.1-macosx-carbon.tar.gz) yesterday, I started to get the following error message:</p>
<div id="attachment_302" class="wp-caption alignnone" style="width: 423px"><img class="size-full wp-image-302" title="eclipse-update-error" src="http://www.nilspreusker.de/wp-content/uploads/2009/11/eclipse-update-error.png" alt="eclipse-update-error" width="413" height="150" /><p class="wp-caption-text">Eclipse error message: &quot;Cannot complete the request. This installation has not been configured properly for software updates!&quot;</p></div>
<p>To fix this, you need to go to &#8220;Preferences &gt; General &gt; Capabilities&#8221; and check &#8220;Classic Update&#8221;. Afterwards you should be able to select &#8220;Help &gt; Software Updates &gt; Find and Install&#8230;&#8221;.</p>
<p>I wasn&#8217;t able to find much on the internet, but <a href="https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/438414/comments/18" target="_blank">this post on an Ubuntu forum</a> finally brought the solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nilspreusker.de/2009/11/24/eclipse-on-snow-leopard-10-6-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Java and Snow Leopard</title>
		<link>http://www.nilspreusker.de/2009/09/22/java-and-snow-leopard/</link>
		<comments>http://www.nilspreusker.de/2009/09/22/java-and-snow-leopard/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 11:38:46 +0000</pubDate>
		<dc:creator>nils</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.nilspreusker.de/?p=259</guid>
		<description><![CDATA[I noticed that there isn&#8217;t a whole lot of useful information about Java and Snow Leopard (OS X 10.6) out there on the web. Maybe this is because there isn&#8217;t a whole lot to say about it. Snow Leopard comes with Java 6 (1.6.0_15 that is) only, which means that the links that still exist [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed that there isn&#8217;t a whole lot of useful information about Java and Snow Leopard (OS X 10.6) out there on the web. Maybe this is because there isn&#8217;t a whole lot to say about it. Snow Leopard comes with Java 6 (1.6.0_15 that is) <span style="text-decoration: underline;"><strong>only</strong></span>, which means that the links that still exist in the</p>
<pre>/System/Library/Frameworks/JavaVM.framework/Versions/</pre>
<p>directory all point to &#8220;CurrentJDK&#8221;, which points to &#8220;1.6&#8243;. The thing is that Snow Leopard ships with a 32 bit version and a 64 bit version of the VM (Virtual Machine), 64 bit being the default one. The Java Preferences app shows this nicely:</p>
<p><img src="http://www.nilspreusker.de/wp-content/uploads/2009/09/java-preferences.png" alt="Java Preferences Application" /></p>
<p>And that is the big news about it, since a 32 bit version of java 6 didn&#8217;t previously exist for OS X.</p>
<p>Now I&#8217;ve previously had to tweak Eclipse to use the 1.5 VM (see &#8220;<a title="Java Versions on Mac OS X" href="http://www.nilspreusker.de/2009/03/03/java-versions-on-mac-os-x/" target="_self">Java Versions on Mac OS X</a>&#8220;), and now it just works. I&#8217;m assuming that this is because of the &#8220;mixed mode&#8221;:</p>
<pre>$ java -version
java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03-219)
Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02-90, mixed mode)</pre>
<p>&#8230;so the VM would automatically detect if an application should be executed in 64 or 32 bit mode and then start the correct VM. I still need to investigate how this actually works. Anyway, the good news is that java and eclipse seems to be working better with Snow Leopard. I&#8217;ll write more on this as I continue working with it, for now here is an interesting post on the topic:</p>
<p><a title="Eclipse, Java and Snow Leopard" href="http://blog.zvikico.com/2009/09/eclipse-java-and-snow-leopard.html" target="_blank">http://blog.zvikico.com/2009/09/eclipse-java-and-snow-leopard.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nilspreusker.de/2009/09/22/java-and-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Find out which applications are listening to which port on Mac OSX</title>
		<link>http://www.nilspreusker.de/2009/09/11/find-out-which-applications-are-listening-to-which-port-on-mac-osx/</link>
		<comments>http://www.nilspreusker.de/2009/09/11/find-out-which-applications-are-listening-to-which-port-on-mac-osx/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 16:31:07 +0000</pubDate>
		<dc:creator>nils</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://www.nilspreusker.de/?p=254</guid>
		<description><![CDATA[If you ever wonder which ports are open on your OS X machine, or whether e.g. jboss is still running, this command will help you:
$sudo lsof -Pi &#124; grep -i "listen"
FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
Man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man
]]></description>
			<content:encoded><![CDATA[<p>If you ever wonder which ports are open on your OS X machine, or whether e.g. jboss is still running, this command will help you:</p>
<pre>$sudo lsof -Pi | grep -i "listen"</pre>
<p>FAQ: <a title="FAQ" href="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ" target="_blank">ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ</a><br />
Man page: <a title="Man Page" href="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man" target="_blank">ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nilspreusker.de/2009/09/11/find-out-which-applications-are-listening-to-which-port-on-mac-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Different Maven Versions on OS X</title>
		<link>http://www.nilspreusker.de/2009/04/24/different-maven-versions-on-os-x/</link>
		<comments>http://www.nilspreusker.de/2009/04/24/different-maven-versions-on-os-x/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 14:06:08 +0000</pubDate>
		<dc:creator>nils</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://www.nilspreusker.de/?p=246</guid>
		<description><![CDATA[I keep running into the problem that different projects I&#8217;m working on require different versions of maven. I have two versions installed, maven 2.0.6 in /usr/share/maven-2.0.6 and maven 2.0.9 in /usr/share/maven. To find out which version of maven you are running, open a terminal and type the following
$ mvn --version
Maven version: 2.0.9
Java version: 1.6.0_07
OS name: [...]]]></description>
			<content:encoded><![CDATA[<p>I keep running into the problem that different projects I&#8217;m working on require different versions of maven. I have two versions installed, maven 2.0.6 in /usr/share/maven-2.0.6 and maven 2.0.9 in /usr/share/maven. To find out which version of maven you are running, open a terminal and type the following</p>
<pre>$ mvn --version
Maven version: 2.0.9
Java version: 1.6.0_07
OS name: "mac os x" version: "10.5.6" arch: "x86_64" Family: "mac"</pre>
<p>In this case, maven 2.0.9 is running, so we&#8217;ll see how to switch to maven 2.0.6. First we need to know where the maven executable, or in this case, the symbolic link to the executable is located:</p>
<pre>$ which mvn
/usr/bin/mvn</pre>
<p>Next, we&#8217;ll use ls to check where the symbolic link is pointing:</p>
<pre>$ ls -l /usr/bin/mvn
lrwxr-xr-x  1 root  wheel  24 Apr 24 14:26 /usr/bin/mvn -&gt; /usr/share/maven/bin/mvn</pre>
<p>Finally, if you have different maven versions installed, you can switch between them by overwriting the symbolic link:</p>
<pre>$ sudo ln -fhsv /usr/share/maven-2.0.6/bin/mvn /usr/bin/mvn</pre>
<p>After providing your password, the symbolic link should now be pointing to the maven 2.0.6 executable. To doublecheck, type</p>
<pre>$ mvn --version</pre>
<p>The output should be something like this</p>
<pre>Maven version: 2.0.6</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.nilspreusker.de/2009/04/24/different-maven-versions-on-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling and Installing mod_auth_mysql on OS X 10.5.6</title>
		<link>http://www.nilspreusker.de/2009/04/17/compiling-and-installing-mod_auth_mysql-on-os-x-1056/</link>
		<comments>http://www.nilspreusker.de/2009/04/17/compiling-and-installing-mod_auth_mysql-on-os-x-1056/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 17:43:57 +0000</pubDate>
		<dc:creator>nils</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.nilspreusker.de/?p=232</guid>
		<description><![CDATA[The apche module mod_auth_mysql makes it possible to use a MySQL database instead of e.g. a passwd file. There is an installer of the module for Mac OS X 10.4, but no installation package or port for Mac OS X 10.5 or later. I played around with the sources a little bit and finally managed [...]]]></description>
			<content:encoded><![CDATA[<p>The apche module mod_auth_mysql makes it possible to use a MySQL database instead of e.g. a passwd file. There is an installer of the module for Mac OS X 10.4, but no installation package or port for Mac OS X 10.5 or later. I played around with the sources a little bit and finally managed to get it to compile and apache to start without error messages. I&#8217;ve created a diff file to patch mod_auth_mysql.c. The following steps explain how to apply the patch, compile the module and test your apache configuration.</p>
<p>We&#8217;ll first create a src folder in your user directory, download mod_auth_mysql and expand it:</p>
<pre>$ mkdir ~/src
$ cd ~/src
$ curl -O http://puzzle.dl.sourceforge.net/sourceforge/\
modauthmysql/mod_auth_mysql-3.0.0.tar.gz
$ tar zxvf mod_auth_mysql-3.0.0.tar.gz</pre>
<p>Now you have the sources of the module in the folder mod_auth_mysql-3.0.0. Before we can compile it, the patch has to be applied. Here is the diff file <a href="http://www.nilspreusker.de/wp-content/uploads/2009/04/mod_auth_mysql.diff">mod_auth_mysql</a>, save it to</p>
<pre>~/src/mod_auth_mysql-3.0.0/mod_auth_mysql.diff</pre>
<p>To apply the patch, we change to the sources directory and execute the unix patch program that takes the original file and applies the diff file as patch:</p>
<pre>$ cd mod_auth_mysql-3.0.0
$ patch mod_auth_mysql.c mod_auth_mysql.diff</pre>
<p>Now we are ready to compile the module, install it and add it to http.conf, the apache configuration file. Apache modules are compiled using apxs, the <a title="apxs" href="http://httpd.apache.org/docs/2.2/programs/apxs.html" target="_blank">APache eXtenSion tool</a>. Before we start, lets look at the command:<a title="apxs" href="http://httpd.apache.org/docs/2.2/programs/apxs.html" target="_blank"><br />
</a></p>
<pre>$ sudo apxs -c -i -a -D lmysqlclient -lm -lz \
-I/usr/local/mysql/include/mysql/\
-L/usr/local/mysql/lib/ -Wc,"-arch x86_64" \
-Wl,"-arch x86_64" mod_auth_mysql.c</pre>
<p>We should execute apxs as super user because it will attempt to install the module to /usr/libexec/apache2/, so we prepend the command with sudo. the -c option tells apxs to compile the module, -i to install it and -a to add a line to http.conf, telling apache to load the module. The -I and -L options are used to provide information about where MySQL is installed and where to find the mysql.h file. I compiled and installed MySQL from source and installed it in the /usr/local/mysql/ directory, if your installation is in a different place, you might have to adjust these parameters. (An excellent guide on compiling and installing MySQL on OS X is available at http://hivelogic.com: &#8220;<a title="Installing MySQL on Mac OS X" href="http://hivelogic.com/articles/view/installing-mysql-on-mac-os-x" target="_blank">Installing MySQL on Mac OS X</a>&#8220;)</p>
<p>When you execute the above command, you should see an output like this:</p>
<pre>/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc    -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp  -I/usr/include/apache2  -I/usr/include/apr-1   -I/usr/include/apr-1  -arch x86_64 -I/usr/local/mysql/include/mysql/ -Dlmysqlclient  -c -o mod_auth_mysql.lo mod_auth_mysql.c &amp;&amp; touch mod_auth_mysql.slo
/usr/share/apr-1/build-1/libtool --silent --mode=link gcc -o mod_auth_mysql.la -arch x86_64  -L/usr/local/mysql/lib/ -lm -lz -rpath /usr/libexec/apache2 -module -avoid-version    mod_auth_mysql.lo
/usr/share/httpd/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1/build-1/libtool' mod_auth_mysql.la /usr/libexec/apache2
/usr/share/apr-1/build-1/libtool --mode=install cp mod_auth_mysql.la /usr/libexec/apache2/
cp .libs/mod_auth_mysql.so /usr/libexec/apache2/mod_auth_mysql.so
cp .libs/mod_auth_mysql.lai /usr/libexec/apache2/mod_auth_mysql.la
cp .libs/mod_auth_mysql.a /usr/libexec/apache2/mod_auth_mysql.a
ranlib /usr/libexec/apache2/mod_auth_mysql.a
chmod 644 /usr/libexec/apache2/mod_auth_mysql.a
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/libexec/apache2

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
     during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /usr/libexec/apache2/mod_auth_mysql.so
[activating module `mysql_auth' in /private/etc/apache2/httpd.conf]</pre>
<p>If there are no error messages, you can test the apache configuration with apachectl:</p>
<pre>$ apachectl configtest</pre>
<p>If the output is</p>
<pre>Syntax OK</pre>
<p>you can continue by restarting apache:</p>
<pre>$ sudo apachectl graceful</pre>
<p>The next step would be to set up your locations in http.conf, but that&#8217;s for another time&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nilspreusker.de/2009/04/17/compiling-and-installing-mod_auth_mysql-on-os-x-1056/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Java Versions on Mac OS X</title>
		<link>http://www.nilspreusker.de/2009/03/03/java-versions-on-mac-os-x/</link>
		<comments>http://www.nilspreusker.de/2009/03/03/java-versions-on-mac-os-x/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 15:20:56 +0000</pubDate>
		<dc:creator>nils</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.nilspreusker.de/?p=206</guid>
		<description><![CDATA[Update: This post refers to OS X 10.5 &#8220;Leopard&#8221;, if you are using 10.6 &#8220;Snow Leopard&#8221;, you might want to consider reading my post &#8220;Java and Snow Leopard&#8221; instead.

I just started using my Mac as a development machine and thought I&#8217;d share some of the issues and solutions I came across. I&#8217;m using Java 6, [...]]]></description>
			<content:encoded><![CDATA[<p><em>Update: This post refers to OS X 10.5 &#8220;Leopard&#8221;, if you are using 10.6 &#8220;Snow Leopard&#8221;, you might want to consider reading my post &#8220;<a title="Java and Snow Leopard" href="http://www.nilspreusker.de/2009/09/22/java-and-snow-leopard/" target="_self">Java and Snow Leopard</a>&#8221; instead.<br />
</em></p>
<p>I just started using my Mac as a development machine and thought I&#8217;d share some of the issues and solutions I came across. I&#8217;m using Java 6, Tomcat 6, Eclipse 3.3.2 (Europa), hibernate 3, Spring 2.0.3 and tapestry 1.4.5.</p>
<p>The first issue I came across was an</p>
<pre>UnsupportedClassVersionError: Bad version number in .class file</pre>
<p>error when I tried to start tomcat. (I&#8217;m using the sysdeo plug-in to control tomcat, even though I&#8217;m aware that WTP is much better&#8230; I have my reasons, but that&#8217;s beyond the scope of this post.)</p>
<p>Now the title of the console in Eclipse revealed the problem, the Sysdeo plug-in was using version 1.4 of the Java RE. The thing is, I didn&#8217;t notice this until I tried a whole bunch of other stuff&#8230; which cost me quite a bit of time, but also helped understand a few things better.</p>
<p>OS X keeps the different Java versions neatly separated in the</p>
<pre>/System/Library/Frameworks/JavaVM.framework/Versions</pre>
<p>directory. By creating or overwriting the symbolic link &#8220;CurrentJDK&#8221;, you can change the default JDK version of your system. To do this, you have to change to the Versions directory and set a new symlink with ln:</p>
<pre>$cd /System/Library/Frameworks/JavaVM.framework/Versions
$sudo ln -fhsv 1.6 CurrentJDK</pre>
<p>After providing the administrator password, the default JDK will be set to version 1.6. Unfortunately, after doing this, I couldn&#8217;t start Eclipse anymore. The fix for this is to edit the following file:</p>
<pre>/Applications/eclipse/Eclipse.app/Contents/Info.plist</pre>
<p>and un-comment the following line:</p>
<pre>&lt;string&gt;-vm&lt;/string&gt;&lt;string&gt;/System/Library/Frameworks/
JavaVM.framework/Versions/1.5.0/Commands/java&lt;/string&gt;</pre>
<p>This tells Eclipse to use a specific Java version, instead of the platforms default one. Now I was able to start Eclipse again and tomcat started without exceptions when I manually deployed my war files. My next step was to try Sysdeo to start Tomcat, which is where I realized that all I would have had to do was to set the correct JVM in Preferences &gt; Tomcat &gt; JVM Settings. Anyway, learned something on the way <img src='http://www.nilspreusker.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here are some links that helped me:</p>
<p><a href="http://blog.kischuk.com/2008/05/08/running-eclipse-on-macbooks-with-java-6/" target="_blank">http://blog.kischuk.com/2008/05/08/running-eclipse-on-macbooks-with-java-6/</a></p>
<p><a href="http://www.insanelymac.com/forum/index.php?showtopic=58817&amp;st=0&amp;p=435204&amp;#entry435204" target="_blank">http://www.insanelymac.com/forum/index.php?showtopic=58817&amp;st=0&amp;p=435204&amp;#entry435204</a></p>
<p><a href="http://johnnywey.wordpress.com/2008/06/21/os-x-and-java-unsupportedclassversionerror/" target="_blank">http://johnnywey.wordpress.com/2008/06/21/os-x-and-java-unsupportedclassversionerror/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nilspreusker.de/2009/03/03/java-versions-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Back me up!</title>
		<link>http://www.nilspreusker.de/2009/01/18/back-me-up/</link>
		<comments>http://www.nilspreusker.de/2009/01/18/back-me-up/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 01:51:09 +0000</pubDate>
		<dc:creator>nils</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[NAS]]></category>
		<category><![CDATA[Time Machine]]></category>
		<category><![CDATA[TS-409]]></category>

		<guid isPermaLink="false">http://www.nilspreusker.de/?p=157</guid>
		<description><![CDATA[After having months of sleepless nights because I wasn&#8217;t backing up my MacBook Pro, I finally decided that something had to happen. What made me hesitate for a while wasn&#8217;t so much the search for the right hardware but rather the fact that what i had in mind would be quite an investment. I didn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>After having months of sleepless nights because I wasn&#8217;t backing up my MacBook Pro, I finally decided that something had to happen. What made me hesitate for a while wasn&#8217;t so much the search for the right hardware but rather the fact that what i had in mind would be quite an investment. I didn&#8217;t want to go for yet another external hard drive because I thought the best solution would be a NAS that I can connect to the network and then access wirelessly from my laptop. Apart from relieving you from having to worry about dragging USB hard disks along when you move your laptop, a NAS with space for several disks also has the advantage that you can create RAID volumes and mirror your disks.</p>
<p>So after a lot of hesitation I settled for the Qnap TS-409 Pro and decided to start off with two 1TB Western Digital (Caviar Green WD10EACS) hard disks. This setup would allow me to start with a RAID 1 Mirroring Disk Volume configuration, effectively leaving 1 TB for use and mirroring the disks so I can be sure that even if a hard drive fails, my data won&#8217;t be lost. Later on I can still add two more disks to extend the capacity and I don&#8217;t even have to switch the 409 off for that. Another nice feature is that the TS-409 has three USB ports and supports automatic sharing of attached USB hard drives. This way I can continue using the external hard disks I bought before. So much for the server and hardware side of my NAS backup experiment. Lets look at <strong>the Software side.</strong></p>
<p>The main scenario I want to be prepared for is a total system failure that requires me to restore or re-install my OS. So I needed a solution that writes bootable disk images and gives me a way to restore them. Since OS X provides a standard image format and the Disk Utility that you can start from the OS X installation disk and that enables you to mount and restore these image files, all a good backup tool needs to offer is a way to create both full and incremental backups. <strong>SuperDuper!</strong> does this and it is affordable, so I chose to try it.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-167" title="superduper" src="http://www.nilspreusker.de/wp-content/uploads/2009/01/superduper.jpg" alt="" width="350" height="356" /></p>
<p>It turns out that the free version of SuperDuper! enables you to write fully functional backups that you can mount or restore afterwards. By mounting them, you can browse your backup as if it was an actual physical drive. The only restriction of the free version of SuperDuper! is that it doesn&#8217;t support incremental backups. Since you&#8217;ll only need these later anyway and I was eager to get started, this was the perfect deal for me.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-168" title="superduper-finished" src="http://www.nilspreusker.de/wp-content/uploads/2009/01/superduper-finished.jpg" alt="" width="350" height="347" /></p>
<p>Up to here, everything went really smooth. But of course I wanted more. Since Leopard has Time Machine built in and it gives you such a nice interface to browse snapshots of your file system, I felt like it would be a good addition to SuperDuper!. In fact, on their web site, the developers of SuperDuper!  even call it the perfect companion to Time Machine. The fundamental difference between the two is that SuperDuper! gives you a full backup that you can use to restore your system in case the hard disk fails or you mess up your system in some other way. Time Machine on the other hand creates hourly, daily and monthly snapshots of your files and provides an intuitive and simple user interface to browse them and restore them to previous states. I believe a sensable setup is to exclude all system files and basically only let Time Machine back up your data (Users directory) and leave the responsibility for system backups to SuperDuper!.</p>
<p>So much for the theory, but here comes the problem: Time Machine doesn&#8217;t support network drives. Luckily there is a simple solution for this. Open up a Terminal window and execute the following command</p>
<pre style="padding-left: 30px;"><span style="color: #0000ff;"><span style="color: #000000;">$</span> <span style="color: #000000;">defaults write com.apple.systempreferences
TMShowUnsupportedNetworkVolumes 1</span></span></pre>
<p>BTW, in case you are worried about messing up your system with this or not knowing how to revert it&#8230; the answer is simple</p>
<pre style="padding-left: 30px;"><span style="color: #0000ff;"><span style="color: #000000;">$</span> <span style="color: #000000;">defaults write com.apple.systempreferences
TMShowUnsupportedNetworkVolumes 0</span></span></pre>
<p>Seems logical, doesn&#8217;t it <img src='http://www.nilspreusker.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Afterwards you can open the Time Machine preferences in System Preferences and by choosing &#8220;Change Disk&#8230;&#8221; select your network drive. Unfortunately, that isn&#8217;t where the story ends though. After kicking off the first backup by selecting the Time Machine icon in the menu bar and then selecting &#8220;Back Up Now&#8221;, I got the error message &#8220;<strong>Time Machine Error &#8211; The backup disk image could not be created.</strong>&#8221; Luckily there is also an easy solution for this. We first need to look at whats happening here though. Time Machine seems to be creating an image file on the network drive. You can actually see the file being created but when Time Machine fails, it removes it. The name of the file that is being created contains the computer name, followed by an under score and the MAC address of the primary ethernet device (en0) without colons. Our workaround will be to manually create this file with the Disk Utility and then copy it over to the network drive we have selected in the Time Machine preferences.</p>
<p>So now you can either look up your MAC address by typing in &#8220;ifconfig&#8221; in the Terminal, looking for en0 and then checking what it says after ether or you can try to copy the file name while Time Machine temporarily creates the image file. Either way, you should end up with a file named <strong>&lt;computer-name&gt;_&lt;mac-address-without-colons&gt;.sparsebundle</strong>. Note that the .sparsebundle extension is added automatically by the Disk Utility. Now you just have to open the Disk Utility, click &#8220;New Image&#8221;, type in the image file name and select &#8220;sparse bundle disk image&#8221; as image format and set a reasonable volume size. The thing to keep in mind here is that the image file won&#8217;t initially have the file size you select here but will be able to grow to a maximum of this size. I actually found a very interesting and useful article about this <a title="Things you should know about the maximum size of the image and the free space on the network share." href="http://www.flokru.org/2008/03/15/time-machine-backups-on-network-shares-2-possible-problems/" target="_blank">here</a>. After clicking &#8220;Create&#8221; and waiting a bit, the image file will be created and we can copy it over to the network drive. After starting a Time Machine backup by selecting &#8220;Backup Now&#8221; from the menu, I finally ended up with this&#8230;</p>
<p style="text-align: center;"><img class="size-full wp-image-166 aligncenter" title="timemachinebackup" src="http://www.nilspreusker.de/wp-content/uploads/2009/01/timemachinebackup.jpg" alt="" width="399" height="90" /></p>
<p>I found quite a lot of discussions and hints about this topic on the internet. Here are the articles that really helped to solve the problem:</p>
<ul>
<li><a title="Time Machine backups on network shares in Leopard" rel="bookmark" href="http://www.flokru.org/2008/02/29/time-machine-backups-on-network-shares-in-leopard/" target="_blank">Time Machine backups on network shares in Leopard</a></li>
<li><a title="Using Leopard Time Machine to Backup of a Network" rel="bookmark" href="http://blog.imulus.com/george/software/using-leopard-time-machine-to-backup-of-a-network/" target="_blank">Using Leopard Time Machine to Backup of a Network</a></li>
<li><a title="Time Machine with Network drive" rel="bookmark" href="http://smangal.wordpress.com/2007/12/10/time-machine-with-network-drive/" target="_blank">Time Machine with Network drive</a></li>
</ul>
<p>A <a title="Topic : Time Machine. Backup failed with error code: 21 " href="http://discussions.apple.com/thread.jspa?messageID=8441040" target="_blank">thread</a> in the apple discussion forum suggests that the Time Machine backup might fail when the computer name contains certain characters. According to the post, the following characters are safe to use in the computer name: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</p>
<p>I hope this is useful for some people. Have fun and feel free to comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nilspreusker.de/2009/01/18/back-me-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
