<?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>Denver Dev Blog &#187; Java</title>
	<atom:link href="http://ambientideas.com/blog/index.php/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://ambientideas.com/blog</link>
	<description>Matthew McCullough&#039;s insights on software development as co-founder of Ambient Ideas, LLC</description>
	<lastBuildDate>Wed, 23 Nov 2011 17:42:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>The Fall Conference Tour</title>
		<link>http://ambientideas.com/blog/index.php/2010/10/the-fall-conference-tour/</link>
		<comments>http://ambientideas.com/blog/index.php/2010/10/the-fall-conference-tour/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 03:02:07 +0000</pubDate>
		<dc:creator>Matthew McCullough</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[NFJS]]></category>
		<category><![CDATA[Presenting]]></category>

		<guid isPermaLink="false">http://ambientideas.com/blog/index.php/2010/10/the-fall-conference-tour/</guid>
		<description><![CDATA[In the last two months I've had the privilege of presenting at and attending six different technology events. They've been so fun and diverse that a quick recap is in order.]]></description>
			<content:encoded><![CDATA[<p>In the last two months I&#8217;ve had the privilege of presenting at and attending six different technology events. They&#8217;ve been so fun and diverse that a quick recap is in order.</p>
<h2>No Fluff Just Stuff Symposium in Atlanta</h2>
<p>This was my first time presenting at an <a href="http://nofluffjuststuff.com">NFJS</a> event in Atlanta, and you can be certain I&#8217;ll be back. Earlier in the Summer, I had the opportunity to address the <a href="http://ajug.org">Atlanta Java Users Group (AJUG)</a> and show off the flexibility of Git. For the NFJS Symposium, I talked about Hadoop, Git, Encryption on the JVM and Open Source Debugging, which are my &#8220;fun but informative talks&#8221; lineup for 2010.</p>
<h2>Colorado Springs Open Source User Group</h2>
<p>Gary Hessler runs a <a href="http://www.meetup.com/csopensource/">great user group</a> in Denver&#8217;s sister city to the south. I had the opportunity to present <a href="http://git-scm.com">Git</a>, one of my favorite topics since it is accessible no matter what language you program in and what platform you use. My NFJS colleague, <a href="http://augusttechgroup.com/">Tim Berglund</a> presented his always well-received <a href="http://www.nofluffjuststuff.com/conference/minneapolis/2010/10/session?id=19435">Decision Making</a> talk. It is an interesting divergence from the typical programmer presentation and gives you techniques to deal with team dynamics.</p>
<h2>JavaZone in Norway</h2>
<p><img src="http://ambientideas.com/blog/wp-content/uploads/2010/10/IMG_04921.jpg" width="480" height="358" alt="Besseggen, Memurubu Hike" align="right" style="padding-top:5px;padding-left:5px;padding-right:5px;padding-bottom:5px;"/></p>
<p>The ever-excellent <a href="http://www.java.no/">JavaBin User Group</a> in Norway put on a stellar conference called <a href="http://jz10.java.no/">JavaZone</a> for 2000+ people. What a show! The diversity of talk formats, speakers, and topics is simply incredible. After the conference, about 25 of us experienced a once-in-a-lifetime event of hiking in the Norwegian countryside. The <a href="http://jz10.java.no/images/foredragsholdere.png">otherworldly photos</a> and <a href="http://jz10.java.no/journey.html">hike details</a> will make you want to attend next year!</p>
<p>The sessions are recorded at JavaZone and two of mine are available online. The former was in the big room in a formal setting. The latter talk was in a smaller room at the end of the conference and had a more informal feel where questions could be asked of the audience and vice-versa.<br />
<a href="http://streaming.java.no/tcs/?id=67136867-86E5-4BA8-94AC-8C617A7331DE">Encryption Boot Camp on the JVM</a></p>
<p><a href="http://streaming.java.no/tcs/?id=EC102300-8325-4744-A28B-A83E311AAACD">Hadoop: Divide and Conquer Gigantic Datasets</a></p>
<h2>StrangeLoop in St. Louis Missouri</h2>
<p>After returning from JavaZone, I headed to Missouri for the <a href="http://strangeloop2010.com/">super-technical event named StrangeLoop</a> brewed by <a href="http://tech.puredanger.com/">Alex Miller</a>. The lineup of speakers was stellar and the non-profit atmosphere was very relaxing. <a href="http://www.hilarymason.com/">Hilary Mason</a>, <a href="http://en.wikipedia.org/wiki/Guy_L._Steele,_Jr.">Guy Steele</a>, <a href="http://yehudakatz.com/">Yehuda Katz</a>, <a href="http://en.wikipedia.org/wiki/Joshua_Bloch">Josh Bloch</a>, <a href="http://en.wikipedia.org/wiki/Douglas_Crockford">Doug Crockford</a>, and many others. I will be attending next year if the timing works out again.</p>
<h2>No Fluff Just Stuff Symposium in Minneapolis</h2>
<p>My home base of conferences, <a href="http://nofluffjuststuff.com">NFJS</a>, brought me up to the always warm audiences of Minneapolis. This has to be one of my top-5 favorite stops on the tour due to the beautiful hotel and the technologically advanced attendees. Their questions are deep and I try to be as prepared as possible for them. I had the privilege of <a href="http://www.nofluffjuststuff.com/conference/speaker/brian_sletten">Brian Sletten</a> and <a href="http://www.devjam.com/">David Hussman</a> sitting in my classes about <a href="http://hadoop.apache.org">Hadoop</a>.</p>
<h2>SpringOne</h2>
<p>The sprint of conferences concluded with my attendance and helping out with the logistics of <a href="http://www.springone2gx.com/conference/chicago/2010/10/home">SpringOne2GX</a> in Chicago. The hotel was spectacular and the attendance overwhelming. It seemed to be just shy of a 1000 people and double last year&#8217;s attendance. I attended some great sessions and had hallway chats with the likes of Hamlet D`Arcy, Hans Dockter, Paul King, Andres Almiray (our co-incidence rate at conferences is getting to be uncanny!), Peter Bell, and Chris Beams. I&#8217;ll try to put in some abstracts for next year and get invited to speak!</p>
]]></content:encoded>
			<wfw:commentRss>http://ambientideas.com/blog/index.php/2010/10/the-fall-conference-tour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encryption on the Java Virtual Machine (JVM): Necessary and Easy</title>
		<link>http://ambientideas.com/blog/index.php/2010/08/encryption-on-the-java-virtual-machine-jvm-necessary-and-easy/</link>
		<comments>http://ambientideas.com/blog/index.php/2010/08/encryption-on-the-java-virtual-machine-jvm-necessary-and-easy/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 20:59:53 +0000</pubDate>
		<dc:creator>Matthew McCullough</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OpenSource]]></category>

		<guid isPermaLink="false">http://ambientideas.com/blog/index.php/2010/08/encryption-on-the-java-virtual-machine-jvm-necessary-and-easy/</guid>
		<description><![CDATA[I've embarked on a mission this year to  educate as many developers as possible  about the basic vocabulary of encryption, the history of how these algorithms and techniques came about, and how to effectively implement the right use of encryption for business applications.  

...This talk will get you up to speed and send you on your way to making your applications more secure, leverage encryption properly, and protect your valuable customer data from prying eyes. ]]></description>
			<content:encoded><![CDATA[<h2>The Bad News of Data Breaches</h2>
<p>The <a href="http://www.bestsecuritytips.com/news+article.storyid+226.htm" target="_blank">news keeps pouring in day after day</a> and week after week of <a href="http://www.privacyrights.org/data-breach" target="_blank">significant company-damaging data breaches</a>. No wonder; <a href="http://www.ponemon.org/data-security" target="_blank">Only 23% of companies surveyed in a recent poll</a> indicated that data encryption was even a priority.  We should not be having, reading about and reacting to most of these. Such events are typically quite preventable. The JVM platform has some of the <a href="http://www.oracle.com/technetwork/java/javase/tech/index-jsp-136007.html" target="_blank">strongest and simplest support for encryption</a> of any programming language. An easy to use Java API for encryption, as well as <a href="http://jasypt" target="_blank">several high level open source libraries</a>, are at developers&#8217; beck and call. I&#8217;ve embarked on a mission this year to <a href="http://github.com/matthewmccullough/encryption-jvm-bootcamp" target="_blank">educate as many developers as possible</a> about the basic vocabulary of encryption, the history of how these algorithms and techniques came about, and how to effectively implement the right use of encryption for business applications.</p>
<h2>The Solution in the form of Education</h2>
<p>I first brought this topic of <i>Encryption on the JVM</i> to <a href="http://denverjug.org" target="_blank">user groups</a> in my home town of Denver, Colorado, USA. It received a more than warm welcome and deep after-talk discussions. Next, I took this topic on the road with the <a href="http://nofluffjuststuff.com" target="_blank">No Fluff Just Stuff symposium series</a> in the USA. Next, I&#8217;m excited to get to share these <a href="http://delicious.com/matthew.mccullough/bundle:encryption" target="_blank">same concepts</a> with audiences in <a href="http://oredev.org/2010" target="_blank">Sweden at the always-cutting-edge Øredev conference</a>, shortly followed by the equally esteemed <a href="http://www.devoxx.com/display/Devoxx2K10/Home" target="_blank">Devoxx in Belgium.</a></p>
<h2>Acting on the Need for Encryption</h2>
<p><a href="http://www.schneier.com/book-applied.html" target="_blank">Discard the notion that encryption is too hard to learn</a>.  Embrace that encryption is quickly becoming a <a href="http://www.iacr.org/jobs/" target="_blank">necessary skill of sought-after developers</a>, the world over. This talk will get you up to speed and send you on your way to making your applications more secure, leverage encryption properly, and protect your valuable customer data from prying eyes. No longer just a notable stretch goal, this is the new responsible level of application engineering. I hope to see you at <a href="http://ambientideas.com/blog/index.php/2010/08/presenting-in-europe/" target="_blank">one of these exciting events</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://ambientideas.com/blog/index.php/2010/08/encryption-on-the-java-virtual-machine-jvm-necessary-and-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iBeans Screencast Launched</title>
		<link>http://ambientideas.com/blog/index.php/2010/05/ibeans-screencast-launched/</link>
		<comments>http://ambientideas.com/blog/index.php/2010/05/ibeans-screencast-launched/#comments</comments>
		<pubDate>Fri, 14 May 2010 20:15:52 +0000</pubDate>
		<dc:creator>Matthew McCullough</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[iBeans]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OpenSource]]></category>

		<guid isPermaLink="false">http://ambientideas.com/blog/index.php/2010/05/ibeans-screencast-launched/</guid>
		<description><![CDATA[ In concert with my  NFJS Tour  talks on  MuleSoft iBeans , I've just released a  corresponding 15 minute video on writing an iBean  with a quick explanation of the motivations and syntax contributing to this  unique lighter-than-ESB platform . ]]></description>
			<content:encoded><![CDATA[<p>In concert with my <a href="http://www.nofluffjuststuff.com/conference/bloomington/2010/04/session?id=16972" target="_blank">NFJS Tour</a> talks on <a href="http://www.mulesoft.org/display/IBEANS/Home" target="_blank">MuleSoft iBeans</a>, I&#8217;ve just released a <a href="http://vimeo.com/11731925" target="_blank">corresponding 15 minute video on writing an iBean</a> with a quick explanation of the motivations and syntax contributing to this <a href="http://www.mulesoft.com/mulesoft-launches-ibeans-rapid-web-application-integration" target="_blank">unique lighter-than-ESB platform</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ambientideas.com/blog/index.php/2010/05/ibeans-screencast-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My latest DZone RefCard on the Google App Engine has been released</title>
		<link>http://ambientideas.com/blog/index.php/2009/12/my-latest-dzone-refcard-on-the-google-app-engine-has-been-released/</link>
		<comments>http://ambientideas.com/blog/index.php/2009/12/my-latest-dzone-refcard-on-the-google-app-engine-has-been-released/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 04:39:38 +0000</pubDate>
		<dc:creator>Matthew McCullough</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[DZone]]></category>
		<category><![CDATA[GoogleAppEngine]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OpenSource]]></category>

		<guid isPermaLink="false">http://ambientideas.com/blog/index.php/2009/12/my-latest-dzone-refcard-on-the-google-app-engine-has-been-released/</guid>
		<description><![CDATA[<p>I'm excited to announce that my latest RefCard for DZone has been released. In a Q&#38;A session with Lyndsey Clevesy at DZone , I discuss the card's focus on helping developers get started with the Google App Engine for Java . The RefCard is intended to be a jumping off point and provides information about and links to the frameworks that now support GAE as well as external resources to help you dive deep if this new arena of cloud computing .</p>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m excited to announce that my <a href="http://refcardz.dzone.com/refcardz/google-app-engine-java" target="_blank">latest RefCard for DZone</a> has been released. In a <a href="http://java.dzone.com/articles/google-app-engine-java-matthew-mccullough" target="_blank">Q&amp;A session with Lyndsey Clevesy</a>, I discuss the card&#8217;s focus on helping developers get started with the <a href="http://appengine.google.com" target="_blank">Google App Engine for Java</a>.</p>
<p>The RefCard is intended to be a jumping off point and provides information about and links to the <a href="http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine" target="_blank">frameworks that now support GAE</a> as well as external resources to help you dive deep if this new arena of <a href="http://en.wikipedia.org/wiki/Cloud_computing" target="_blank">cloud computing</a>. Grab a copy and <a href="mailto:matthewm@ambientideas.com" target="_blank">send me feedback</a>.<a href="http://refcardz.dzone.com/refcardz/google-app-engine-java" target="_blank"><img src="http://farm3.static.flickr.com/2526/4171139150_997615e911_o_d.png" style="float:left;" width="300" height="250" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ambientideas.com/blog/index.php/2009/12/my-latest-dzone-refcard-on-the-google-app-engine-has-been-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JPS and VisualVM on Windows</title>
		<link>http://ambientideas.com/blog/index.php/2009/10/jps-and-visualvm-on-windows/</link>
		<comments>http://ambientideas.com/blog/index.php/2009/10/jps-and-visualvm-on-windows/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 07:03:29 +0000</pubDate>
		<dc:creator>Matthew McCullough</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://ambientideas.com/blog/index.php/2009/10/jps-and-visualvm-on-windows/</guid>
		<description><![CDATA[ At several stops on the  NFJS tour , I've been asked about  some of the minor issues in running JPS  and VisualVM on the Windows platform.   The primary problem is that the processes in JPS and VisualVM are listed as:   &#60;Unknown Application&#62; (pid ###)    I have been successful in working around this  by renaming the hsperfdata temp directory as noted in a  separate thread on the Sun forums . ]]></description>
			<content:encoded><![CDATA[<p>At several stops on the <a href="http://nofluffjuststuff.com" target="_blank">NFJS tour</a>, I&#8217;ve been asked about <a href="http://markmail.org/message/bfacrkap4kqjn265" target="_blank">some of the minor issues in running JPS</a> and VisualVM on the Windows platform. The primary problem is that the processes in JPS and VisualVM are listed as:</p>
<p>&lt;Unknown Application&gt; (pid ###)</p>
<p><a href="https://visualvm.dev.java.net/troubleshooting.html" target="_blank">I have been successful in working around this</a> by renaming the hsperfdata temp directory as noted in a <a href="http://forums.sun.com/thread.jspa?threadID=5133218" target="_blank">separate thread on the Sun forums</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ambientideas.com/blog/index.php/2009/10/jps-and-visualvm-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BTrace in VisualVM on the Mac</title>
		<link>http://ambientideas.com/blog/index.php/2009/07/btrace-in-visualvm-on-the-mac/</link>
		<comments>http://ambientideas.com/blog/index.php/2009/07/btrace-in-visualvm-on-the-mac/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 14:54:13 +0000</pubDate>
		<dc:creator>Matthew McCullough</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OpenSource]]></category>

		<guid isPermaLink="false">http://ambientideas.com/blog/index.php/2009/07/btrace-in-visualvm-on-the-mac/</guid>
		<description><![CDATA[<p>The BTrace plugin for VisualVM , a tool that I love to showcase at No Fluff Just Stuff and user group events has been updated to version 0.2.2 to solve an issue that prevented it from working on a Mac . Be sure to uninstall any prior version from your VisualVM prior to installing 0.2.2 to get the full benefit of the fix. <img src="http://farm3.static.flickr.com/2521/3742315897_e66bf84eae.jpg" width="480" height="317" alt="Btrace2.png" /> <img src="http://farm3.static.flickr.com/2668/3743094204_f3dd15ca5f.jpg" width="480" height="326" alt="BTrace1.png" /></p>
]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://kenai.com/projects/btrace/pages/BTracePlugin" target="_blank">BTrace plugin for VisualVM</a>, a tool that I love to showcase at <a href="http://www.nofluffjuststuff.com" target="_blank">No Fluff Just Stuff</a> and user group events, has been updated to version 0.2.2. This <a href="http://kenai.com/jira/browse/BTRACE-1" target="_blank">solves an issue that prevented it from working on a Mac</a>. Be sure to uninstall any prior version from your VisualVM prior to installing 0.2.2 to get the full benefit of the fix.</p>
<p><img src="http://farm3.static.flickr.com/2521/3742315897_e66bf84eae.jpg" width="480" height="317" alt="Btrace2.png" /></p>
<p><img src="http://farm3.static.flickr.com/2668/3743094204_f3dd15ca5f.jpg" width="480" height="326" alt="BTrace1.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://ambientideas.com/blog/index.php/2009/07/btrace-in-visualvm-on-the-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java 1.6 Memory Tools on the Mac, Part II</title>
		<link>http://ambientideas.com/blog/index.php/2009/07/java-16-memory-tools-on-the-mac-part-ii/</link>
		<comments>http://ambientideas.com/blog/index.php/2009/07/java-16-memory-tools-on-the-mac-part-ii/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 16:35:14 +0000</pubDate>
		<dc:creator>Matthew McCullough</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[MacOS]]></category>

		<guid isPermaLink="false">http://ambientideas.com/blog/index.php/2009/07/java-16-memory-tools-on-the-mac-part-ii/</guid>
		<description><![CDATA[<p>Then I started checking if this fixed the issue in reverse order, starting with the sudo: [bash] sudo java -version java version "1.6.0_13" Java(TM) SE Runtime Environment (build 1.6.0_13-b03-211) Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02-83, mixed mode) [/bash] <img src="http://farm3.static.flickr.com/2552/3709615153_a367f70a9f.jpg" width="480" height="143" alt="200907110802.jpg" /> Looking good! ... Concurrent Mark-Sweep GC Heap Configuration: &#160;&#160;&#160; MinHeapFreeRatio = 40 &#160;&#160;&#160; MaxHeapFreeRatio = 70 &#160;&#160;&#160; MaxHeapSize = 88080384 (84.0MB) &#160;&#160;&#160; NewSize = 21757952 (20.75MB) &#160;&#160;&#160; MaxNewSize = 43581440 (41.5625MB) &#160;&#160;&#160; OldSize = 64159744 (61.1875MB) &#160;&#160;&#160; NewRatio = 7 &#160;&#160;&#160; SurvivorRatio = 6 &#160;&#160;&#160; PermSize = 21757952 (20.75MB) &#160;&#160;&#160; MaxPermSize = 88080384 (84.0MB) Heap Usage: New Generation (Eden + 1 Survivor Space): &#160;&#160;&#160; capacity = 19070976 (18.1875MB) &#160;&#160;&#160; used = 2351616 (2.24267578125MB) &#160;&#160;&#160; free = 16719360 (15.94482421875MB) &#160;&#160;&#160; 12.330863402061855% used Eden Space: &#160;&#160;&#160; capacity = 16384000 (15.625MB) &#160;&#160;&#160; used = 2351616 (2.24267578125MB) &#160;&#160;&#160; free = 14032384 (13.38232421875MB) &#160;&#160;&#160; 14.353125% used From Space: &#160;&#160;&#160; capacity = 2686976 (2.5625MB) &#160;&#160;&#160; used = 0 (0.0MB) &#160;&#160;&#160; free = 2686976 (2.5625MB) &#160;&#160;&#160; 0.0% used To Space: &#160;&#160;&#160; capacity = 2686976 (2.5625MB) &#160;&#160;&#160; used = 0 (0.0MB) &#160;&#160;&#160; free = 2686976 (2.5625MB) &#160;&#160;&#160; 0.0% used concurrent mark-sweep generation: &#160;&#160;&#160; capacity = 64159744 (61.1875MB) &#160;&#160;&#160; used = 0 (0.0MB) &#160;&#160;&#160; free = 64159744 (61.1875MB) &#160;&#160;&#160; 0.0% used Perm Generation: &#160;&#160;&#160; capacity = 21757952 (20.75MB) &#160;&#160;&#160; used = 4716880 (4.4983673095703125MB) &#160;&#160;&#160; free = 17041072 (16.251632690429688MB) &#160;&#160;&#160; 21.678878600338855% used [/bash] Thanks to a combination of Ken Sipe , Fred Jean , a few good guesses and some investigative work, the problem is solved! ... The short answer is to create a text file called /private/etc/launchd.conf and put the following (applicable portions, based on your tool usage) contents in it: [bash] setenv JAVA_VERSION 1.6 # A) Some process-launchers will cause their child to default to 1.5 if using /Library/Java/Home # even if Java Preferences pane says 1.6 at the top # setenv JAVA_HOME /Library/Java/Home # B) Alternate: Force Java 1.6 as Java Home setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home setenv GROOVY_HOME /Applications/Dev/groovy setenv GRAILS_HOME /Applications/Dev/grails setenv NEXUS_HOME /Applications/Dev/nexus/nexus-webapp setenv JRUBY_HOME /Applications/Dev/jruby # Set up Ant setenv ANT_HOME /Applications/Dev/apache-ant setenv ANT_OPTS -Xmx512M # Set up Maven setenv MAVEN_OPTS -Xmx1024M setenv M2_HOME /Applications/Dev/apache-maven [/bash] With the only pitfall being that it is not honored by sudo'ed java invocations.</p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been battling getting jmap working properly on a new Mac. I followed <a href="http://kensipe.blogspot.com/2008/08/fixing-java-memory-tools-on-mac-os-x.html" target="_blank">the invaluable instructions</a> my <a href="http://www.nofluffjuststuff.com/conference/speaker/ken_sipe.html" target="_blank">NFJS colleague, Ken Sipe</a>, provided for the Rhino engine inclusion. However, I was still encountering an odd issue where I couldn&#8217;t get jmap to attach to a Java process.</p>
<p>First, I would start a simple helloworld Java application.</p>
<p>
<pre>
<pre class="brush: bash; title: ;">
java com.ambientideas.HelloWorldJava
Hello Java World!
</pre>
</pre>
<p>
<img src="http://farm3.static.flickr.com/2590/3709613661_617eff6518.jpg" width="480" height="136" alt="Picture 1.png" /></p>
<p>Then I would get the PID:</p>
<p>
<pre>
<pre class="brush: bash; title: ;">
jps
11554 HelloWorldJava
11573 Jps
</pre>
</pre>
<p>Then I tried to jmap it, but got the following error</p>
<p>
<pre>
<pre class="brush: bash; title: ;">
jmap -heap 11554
Attaching to process ID 11791, please wait...
attach: task_for_pid(11791) failed (5)
Error attaching to process: Error attaching to process, or no such process
</pre>
</pre>
<p>So I thought, &#8220;These memory tools often require root access, so I&#8217;ll sudo it.&#8221; When I did, I got the following equally cryptic error:</p>
<p>
<pre>
<pre class="brush: bash; title: ;">
sudo jmap -heap 11791
Attaching to process ID 11791, please wait...
Exception in thread main java.lang.RuntimeException: gHotSpotVMTypes was not initialized properly in the remote process; can not continue
at sun.jvm.hotspot.HotSpotTypeDataBase.readVMTypes(HotSpotTypeDataBase.java:111)
at sun.jvm.hotspot.HotSpotTypeDataBase.&amp;amp;amp;amp;amp;amp;amp;lt;init&amp;amp;amp;amp;amp;amp;amp;gt;(HotSpotTypeDataBase.java:68)
at sun.jvm.hotspot.MacOSXTypeDataBase.&amp;amp;amp;amp;amp;amp;amp;lt;init&amp;amp;amp;amp;amp;amp;amp;gt;(MacOSXTypeDataBase.java:35)
at sun.jvm.hotspot.bugspot.BugSpotAgent.setupVM(BugSpotAgent.java:560)
at sun.jvm.hotspot.bugspot.BugSpotAgent.go(BugSpotAgent.java:481)
at sun.jvm.hotspot.bugspot.BugSpotAgent.attach(BugSpotAgent.java:319)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:146)
at sun.jvm.hotspot.tools.JMap.main(JMap.java:128)
</pre>
</pre>
<p>I though, &#8220;Hmmmm, this looks a lot like a java version mismatch. Let&#8217;s check which java version I&#8217;m running.&#8221; I had javac compiled the HelloWorld against Java 6, so was expecting a matching java. I made a quick stop into the Java Preferences pane. Yup. Java 6 set as the first-priority choice.</p>
<p>
<img src="http://farm3.static.flickr.com/2464/3710424866_2943f9b502.jpg" width="480" height="337" alt="Picture 2.png" /></p>
<p>Let&#8217;s check the command line too&#8230;</p>
<p>
<pre>
<pre class="brush: bash; title: ;">
java -version
java version 1.6.0_13
Java(TM) SE Runtime Environment (build 1.6.0_13-b03-211)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02-83, mixed mode)
</pre>
</pre>
<p>Excellent. Just what I expected. Java 6. But a little doubt crept into my mind. What if the sudo&#8217;ed invocation were finding a different Java. That didn&#8217;t sound plausible, but yet was still worth checking out.</p>
<p>
<pre>
<pre class="brush: bash; title: ;">
sudo java -version
java version 1.5.0_19
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-304)
Java HotSpot(TM) Client VM (build 1.5.0_19-137, mixed mode, sharing)
</pre>
</pre>
<p>Aha! There&#8217;s the culprit. So somehow, sudo&#8217;ed commands are running Java 5, even though I&#8217;ve set a preference for 6 in my profile. I searched the web high and low for a way to specify the Java version for &#8220;sudo&#8221; specifically, but could find no trace. I even tried the -E flag to maintain the caller&#8217;s environment variables, as is possible on Linux distributions. Not implemented on Mac.</p>
<p>I did a quick check of my path and a &#8220;which java&#8221;. Both ultimately routed to Java 6. I also had JAVA_HOME and JAVA_VERSION set just fine.</p>
<p>
<pre>
<pre class="brush: bash; title: ;">
set | grep JAVA
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
JAVA_VERSION=1.6

echo $PATH
/Applications/Dev/btrace/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:
/usr/X11/bin:./:
/Users/mccm06/scripts:/Applications/Dev/apache-ant/bin:
/Applications/Dev/apache-maven/bin
</pre>
</pre>
<p>So I turned to harness the wisdom of one of the really smart guys (that uses a Mac) I&#8217;m privileged to hang out with in Denver, Fred Jean. Fred said, &#8220;Try adding the 1.6 java explicitly to the front of your path rather than letting Java Preferences pane be the sole controller.&#8221; I opened up ~/.bash_profile (alternatively you could edit ~/.bash_rc)and slammed in the following:</p>
<p>
<pre>
<pre class="brush: bash; title: ;">
export PATH=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands:$PATH
</pre>
</pre>
<p>I opened a new terminal to pick up the shell changes. Then I started checking if this fixed the issue in reverse order, starting with the sudo:</p>
<p>
<pre>
<pre class="brush: bash; title: ;">
sudo java -version
java version 1.6.0_13
Java(TM) SE Runtime Environment (build 1.6.0_13-b03-211)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02-83, mixed mode)
</pre>
</pre>
<p>
<img src="http://farm3.static.flickr.com/2552/3709615153_a367f70a9f.jpg" width="480" height="143" alt="200907110802.jpg" /></p>
<p>Looking good! Now let&#8217;s get back to our core goal, jmap.</p>
<p><img src="http://farm4.static.flickr.com/3447/3709615763_7c8a7ecae1.jpg" width="480" height="430" alt="200907110804.jpg" /></p>
<p>
<pre>
<pre class="brush: bash; title: ;">
sudo jmap -heap 5951
Attaching to process ID 5951, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 11.3-b02-83
using parallel threads in the new generation.
using thread-local object allocation.
Concurrent Mark-Sweep GC
Heap Configuration:
    MinHeapFreeRatio = 40
    MaxHeapFreeRatio = 70
    MaxHeapSize = 88080384 (84.0MB)
    NewSize = 21757952 (20.75MB)
    MaxNewSize = 43581440 (41.5625MB)
    OldSize = 64159744 (61.1875MB)
    NewRatio = 7
    SurvivorRatio = 6
    PermSize = 21757952 (20.75MB)
    MaxPermSize = 88080384 (84.0MB)
Heap Usage:
New Generation (Eden + 1 Survivor Space):
    capacity = 19070976 (18.1875MB)
    used = 2351616 (2.24267578125MB)
    free = 16719360 (15.94482421875MB)
    12.330863402061855% used
Eden Space:
    capacity = 16384000 (15.625MB)
    used = 2351616 (2.24267578125MB)
    free = 14032384 (13.38232421875MB)
    14.353125% used
From Space:
    capacity = 2686976 (2.5625MB)
    used = 0 (0.0MB)
    free = 2686976 (2.5625MB)
    0.0% used
To Space:
    capacity = 2686976 (2.5625MB)
    used = 0 (0.0MB)
    free = 2686976 (2.5625MB)
    0.0% used
concurrent mark-sweep generation:
    capacity = 64159744 (61.1875MB)
    used = 0 (0.0MB)
    free = 64159744 (61.1875MB)
    0.0% used
Perm Generation:
    capacity = 21757952 (20.75MB)
    used = 4716880 (4.4983673095703125MB)
    free = 17041072 (16.251632690429688MB)
    21.678878600338855% used
</pre>
</pre>
<p>Thanks to a combination of <a href="http://twitter.com/kensipe" target="_blank">Ken Sipe</a>, <a href="http://twitter.com/fredjean" target="_blank">Fred Jean</a>, a few good guesses and some investigative work, the problem is solved! I&#8217;m longwindedly calling this the &#8220;java version is different for sudo-initiated processes on Mac&#8221; so that the next person Googling for this using similar keywords will hopefully find this tutorial.</p>
<p>As a closing note, I often get asked how I set my environment variables for Java so that Spotlight-launched, Quicksilver-launched, Dock-launched, and Terminal-launched processes can all see the variables (yes, there&#8217;s some odd pitfalls about that on a Mac due to the process parents being different). The short answer is to create a text file called /private/etc/launchd.conf and put the following (applicable portions, based on your tool usage) contents in it:</p>
<p>
<pre>
<pre class="brush: bash; title: ;">
setenv JAVA_VERSION 1.6
# A) Some process-launchers will cause their child to default to 1.5 if using /Library/Java/Home
# even if Java Preferences pane says 1.6 at the top
# setenv JAVA_HOME /Library/Java/Home
# B) Alternate: Force Java 1.6 as Java Home
setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
setenv GROOVY_HOME /Applications/Dev/groovy
setenv GRAILS_HOME /Applications/Dev/grails
setenv NEXUS_HOME /Applications/Dev/nexus/nexus-webapp
setenv JRUBY_HOME /Applications/Dev/jruby
# Set up Ant
setenv ANT_HOME /Applications/Dev/apache-ant
setenv ANT_OPTS -Xmx512M
# Set up Maven
setenv MAVEN_OPTS -Xmx1024M
setenv M2_HOME /Applications/Dev/apache-maven
</pre>
</pre>
<p>As we have learned the hard way, the only pitfall is that the java version specified in launchd.conf is not honored by sudo&#8217;ed java invocations.</p>
<p><a href="mailto:matthewm@ambientideas.com" target="_blank">Drop me an email</a> if you&#8217;ve seen this issue and this tutorial helps you solve it.</p>
]]></content:encoded>
			<wfw:commentRss>http://ambientideas.com/blog/index.php/2009/07/java-16-memory-tools-on-the-mac-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DZone Maven RefCard Released</title>
		<link>http://ambientideas.com/blog/index.php/2009/05/dzone-maven-refcard-released/</link>
		<comments>http://ambientideas.com/blog/index.php/2009/05/dzone-maven-refcard-released/#comments</comments>
		<pubDate>Fri, 29 May 2009 15:56:08 +0000</pubDate>
		<dc:creator>Matthew McCullough</dc:creator>
				<category><![CDATA[Maven]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://ambientideas.com/blog/index.php/2009/05/dzone-maven-refcard-released/</guid>
		<description><![CDATA[<p>I'm very pleased to announce that my DZone Maven RefCard was released this week ahead of schedule, and JavaLobby did a little introductory interview for the launch. A handful of folks contributed to the early alpha reviews and I want to acknowledge their inputs: Ken Sipe , Tim O'Brien , Chris Maki , Tim Berglund , and Jason van Zyl . ... I'm always looking for ways to contribute to the Maven community , and this was by far the most fun I've had building materials to promote this unique Convention over Configuration build tool.</p>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm3.static.flickr.com/2446/3576408234_42b1eb580d.jpg" width="325" height="421" alt="MavenRefCard.jpg" style="float:right;" />I&#8217;m very pleased to announce that my <a href="http://refcardz.dzone.com/refcardz/apache-maven-2" target="_blank">DZone Maven RefCard</a> was released this week ahead of schedule, and <a href="http://java.dzone.com/articles/maven-refcard-released-meet" target="_blank">JavaLobby did a little introductory interview</a> for the launch. A handful of folks contributed to the early alpha reviews and I want to acknowledge their inputs: <a href="http://kensipe.blogspot.com" target="_blank">Ken Sipe</a>, <a href="http://www.discursive.com/" target="_blank">Tim O&#8217;Brien</a>, <a href="http://cmaki.blogspot.com/" target="_blank">Chris Maki</a>, <a href="http://www.augusttechgroup.com/" target="_blank">Tim Berglund</a>, and <a href="http://www.sonatype.com/people/author/jason/" target="_blank">Jason van Zyl</a>.</p>
<p>The timing was great, as I did a <a href="http://www.slideshare.net/matthewmccullough/mastering-maven-20-in-1-hour-v13" target="_blank">Mastering Maven talk</a> at the <a href="http://www.sdjug.com/" target="_blank">San Diego Java Users Group (SDJUG)</a> on Tuesday night. A handful of the attendees came with printed copies of the RefCard in hand!</p>
<p>I&#8217;m always looking for ways to contribute to the <a href="http://maven.apache.org/" target="_blank">Maven community</a>, and this was by far the most fun I&#8217;ve had building materials to promote this unique Convention over Configuration build tool.</p>
]]></content:encoded>
			<wfw:commentRss>http://ambientideas.com/blog/index.php/2009/05/dzone-maven-refcard-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maven 3.0 Early Access</title>
		<link>http://ambientideas.com/blog/index.php/2009/04/maven-30-early-access/</link>
		<comments>http://ambientideas.com/blog/index.php/2009/04/maven-30-early-access/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 20:28:55 +0000</pubDate>
		<dc:creator>Matthew McCullough</dc:creator>
				<category><![CDATA[Maven]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://ambientideas.com/blog/index.php/2009/04/maven-30-early-access/</guid>
		<description><![CDATA[Jason van Zyl hosted a  Maven Meetup at their offices in Mountain View  in March of this year.    Lots of deep information about Maven 2.0 and 3.0 was shared , and videos of some of the sessions are now starting to be posted to the Vimeo web site. 

...Here are the takeaway points, highly distilled to 140 proof, for those without time to watch the video:   Improved overarching performance (tools, engine, resolution, downloads, builds)  Better tooling integration  Tie-ins with OSGi  Excellence in Eclipse integration  Possibility of non-XML POMs  Lifecycle extension points  High-performance artifact resolution engine  Documentation-hyperlinked error messages   If you want to get access to the Maven 3.0 code, you can  view the list of SVN checkout URLs here  ( or here for the hardcore Git lovers ), or  just view the source in your browser here . ]]></description>
			<content:encoded><![CDATA[<p><a href="http://docs.codehaus.org/display/MAVEN/Maven+3.0.x" target="_blank">Maven 3.0</a>, a mostly-backwards compatible, but significantly improved and extensible version of Maven is developing very quickly. Jason van Zyl hosted a <a href="https://docs.sonatype.org/display/COMM/Maven+Meetup+on+March+19th+and+20th+at+Sonatype" target="_blank">Maven Meetup at their offices in Mountain View</a> in March of this year. <a href="http://www.sonatype.com/people/2009/03/sonatype-maven-meetup-on-march-19th-20th/" target="_blank">Lots of deep information about Maven 2.0 and 3.0 was shared</a>, and videos of some of the sessions are now starting to be posted to the Vimeo web site. The Maven 3.0 video is especially insightful:</p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=4156556&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=4156556&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300" /><br />
</object><br />
<a href="http://vimeo.com/4156556">Jason van Zyl on Maven 3</a> from <a href="http://vimeo.com/sonatype">Sonatype</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>Here are the takeaway points, highly distilled to 140 proof, for those without time to watch the video:</p>
<ul>
<li>Improved overarching performance (tools, engine, resolution, downloads, builds)</li>
<li>Better tooling integration</li>
<li>Tie-ins with OSGi</li>
<li>Excellence in Eclipse integration</li>
<li>Possibility of non-XML POMs</li>
<li>Lifecycle extension points</li>
<li>High-performance artifact resolution engine</li>
<li>Documentation-hyperlinked error messages</li>
</ul>
<p>If you want to get access to the Maven 3.0 code, you can <a href="http://maven.apache.org/source-repository.html" target="_blank">view the list of SVN checkout URLs here</a> (<a href="http://git.apache.org/maven.git" target="_blank">or here for the hardcore Git lovers</a>), or <a href="http://svn.apache.org/viewvc/maven/components/trunk/" target="_blank">just view the source in your browser here</a>. If you want early access to the binaries, you can <a href="http://www.apache.org/dist/maven/binaries/" target="_blank">download them from Apache</a>.</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://ambientideas.com/blog/index.php/2009/04/maven-30-early-access/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maven Unit Tests and Continuous Integration Servers</title>
		<link>http://ambientideas.com/blog/index.php/2009/03/maven-unit-tests-and-continuous-integration-servers/</link>
		<comments>http://ambientideas.com/blog/index.php/2009/03/maven-unit-tests-and-continuous-integration-servers/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 19:50:20 +0000</pubDate>
		<dc:creator>Matthew McCullough</dc:creator>
				<category><![CDATA[Maven]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ContinuousIntegration]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://ambientideas.com/blog/index.php/2009/03/maven-unit-tests-and-continuous-integration-servers/</guid>
		<description><![CDATA[ If you are running a Continuous Integration server such as  Hudson , you'll want to consider routing your  SureFire  outputs to the console so that they'll appear in the build-report logs.   If you leave SureFire at its  default , it will output each test's success or failure  to an individual test XML and TXT file , but those are likely not in an exposed directory on your CI server.   If instead, you  route the output to the console , it will get reported in your failure emails that your CI server is capable of sending. ]]></description>
			<content:encoded><![CDATA[<p>If you are running a Continuous Integration server such as <a href="https://hudson.dev.java.net/" target="_blank">Hudson</a>, you&#8217;ll want to consider routing your <a href="http://maven.apache.org/plugins/maven-surefire-plugin/" target="_blank">SureFire</a> outputs to the console so that they&#8217;ll appear in the build-report logs. If you leave SureFire at its <strong>default</strong>, it will output each test&#8217;s success or failure <strong>to an individual test XML and TXT file</strong>, but those are likely not in an exposed directory on your CI server. If instead, you <a href="http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#useFile" target="_blank">route the output to the console</a>, it will get reported in your failure emails that your CI server is capable of sending.</p>
<p>Just <a href="http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#useFile" target="_blank">pass the useFile=false parameter</a> on the command line or set it in the plugin config section of your pom.xml.</p>
<pre>
<code>mvn test -Dsurefire.useFile=false</code>
</pre>
<p></p>
<p>Before:</p>
<pre>
<code><span style="color: #6C1506;">-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.ambientideas.AppTest
Hello World! This is a JUnit test!
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.045 sec &lt;&lt;&lt; FAILURE!Results :Failed tests:testApp(com.ambientideas.AppTest)Tests run: 1, Failures: 1, Errors: 0, Skipped: 0</span></code>
</pre>
<p>After:</p>
<pre>
<code><span style="color: #3C7D00;">-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.ambientideas.AppTest
Hello World! This is a JUnit test!
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.045 sec &lt;&lt;&lt; FAILURE!
testApp(com.ambientideas.AppTest)  Time elapsed: 0.014 sec  &lt;&lt;&lt; FAILURE!
<span style="color: #0B0581;">junit.framework.AssertionFailedError
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.assertTrue(Assert.java:20)
at junit.framework.Assert.assertTrue(Assert.java:27)
at com.ambientideas.AppTest.testApp(AppTest.java:37)</span>

Results :Failed tests:testApp(com.ambientideas.AppTest)Tests run: 1, Failures: 1, Errors: 0, Skipped: 0</span></code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ambientideas.com/blog/index.php/2009/03/maven-unit-tests-and-continuous-integration-servers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

