weimo.de » Java http://weimo.de no worries, mate Sat, 01 Jan 2011 00:21:44 +0000 en hourly 1 http://wordpress.org/?v=3.0.4 How to compile Apache Mahout on OS X http://weimo.de/node/840 http://weimo.de/node/840#comments Sun, 03 Jan 2010 02:34:20 +0000 Markus Weimer http://weimo.de/?p=840 Continue reading ]]> Compiling Apache Mahout should be straight forward on OS X, as the system comes with all the requirements needed. Turns out that is only partially true, as I hit two issues along the way:

Wrong Java Version

Problem: I got the error 'javac: invalid target release: 1.6' even though I set Java 6 to be the default in the Java Preferences. Even on the command line, 'java -version' showed 1.6 as the version number. However, this did not carry over to Maven, as 'mvn -v' confirmed.

Solution: Explicitly set the 'JAVA_HOME' environment variable. In my case, I set it via 'export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/'

Out of Memory when compiling

Problem: I got an 'java.lang.OutOfMemoryError: Java heap space' when compiling the current svn checkout of Mahout (not the release)

Solution: Set the environment variable 'MAVEN_OPTS' to allow for more memory via 'export MAVEN_OPTS=-Xmx1024m'

Hope this helps when setting up your Apache Mahout development.

]]>
http://weimo.de/node/840/feed 0