<?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>Outside the Box() &#187; compiler</title>
	<atom:link href="http://www.sporcic.org/tag/compiler/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sporcic.org</link>
	<description>Blog of Tim Sporcic</description>
	<lastBuildDate>Tue, 13 Jul 2010 14:57:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Compiler Wierdness</title>
		<link>http://www.sporcic.org/2009/02/compiler-wierdness/</link>
		<comments>http://www.sporcic.org/2009/02/compiler-wierdness/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 21:36:40 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.sporcic.org/?p=128</guid>
		<description><![CDATA[I was playing around with the Spring/ExtJS Template on my Ubuntu box and ran into a strange problem. On the Vista laptop, if I compile with IntelliJ or from the command line with Ant, the application works perfectly fine when I deploy it to Tomcat. On the Ubuntu box, the WAR file generated by IntelliJ [...]]]></description>
			<content:encoded><![CDATA[<p>I was playing around with the Spring/ExtJS Template on my Ubuntu box and ran into a strange problem. On the Vista laptop, if I compile with IntelliJ or from the command line with Ant, the application works perfectly fine when I deploy it to Tomcat. On the Ubuntu box, the WAR file generated by IntelliJ worked fine, but the WAR file output of the Ant script puked and died.</p>
<p>It took about an hour of hair pulling to figure out what the problem is. In the original build.xml file, the compile task looked like this:</p>
<p><a href="http://www.sporcic.org/wp-content/uploads/2009/02/orig-ant.png"><img class="alignnone size-full wp-image-129" title="orig-ant" src="http://www.sporcic.org/wp-content/uploads/2009/02/orig-ant.png" alt="" width="500" height="85" /></a></p>
<p>Notice I didn&#8217;t specify and of the compiler, source or debug options. On Sun&#8217;s JDK 1.6.0_12 for Windows, debug appears to be the default. The Spring annotation needs the debug information for mapping parameter names in views.</p>
<p>On Linux, the same JDK (Sun 1.6.0_12) behaves differently. It does not include the debug information by default. In order to make my Ant build file work, I changed the compile attributes to this:</p>
<p><a href="http://www.sporcic.org/wp-content/uploads/2009/02/ant-after.png"><img class="alignnone size-full wp-image-130" title="ant-after" src="http://www.sporcic.org/wp-content/uploads/2009/02/ant-after.png" alt="" width="500" height="156" /></a></p>
<p>Explicitly defining debug=&#8221;true&#8221; resolved the issue. This is the first time I&#8217;ve bumped in to a basic behavioral difference for Java across operating systems. The lesson learned is play it safe and always specify compiler values.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sporcic.org/2009/02/compiler-wierdness/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
