<?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>Philip Yurchuk &#187; eclipse</title>
	<atom:link href="http://philip.yurchuk.com/tag/eclipse/feed/" rel="self" type="application/rss+xml" />
	<link>http://philip.yurchuk.com</link>
	<description>Software Development Blog</description>
	<lastBuildDate>Wed, 25 Jan 2012 10:07:48 +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>Optimal JVM settings for STS</title>
		<link>http://philip.yurchuk.com/2011/08/15/optimal-jvm-settings-for-sts/</link>
		<comments>http://philip.yurchuk.com/2011/08/15/optimal-jvm-settings-for-sts/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 08:23:40 +0000</pubDate>
		<dc:creator>Philip Yurchuk</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[sts]]></category>

		<guid isPermaLink="false">http://philip.yurchuk.com/?p=146</guid>
		<description><![CDATA[<p>I recently switched from Eclipse 3.6 to STS 2.7.1 (based on Eclipse 3.7). Ditching my old .project and workspace settings files along with the move has made for a smoother experience; it seems these files get corrupted over time,1 and I&#8217;m too lazy to do the research to fix them. However, the upgrade resulted [...]]]></description>
			<content:encoded><![CDATA[<p>I recently switched from Eclipse 3.6 to STS 2.7.1 (based on Eclipse 3.7). Ditching my old .project and workspace settings files along with the move has made for a smoother experience; it seems these files get corrupted over time,<sup><a href="http://philip.yurchuk.com/2011/08/15/optimal-jvm-settings-for-sts/#footnote_0_146" id="identifier_0_146" class="footnote-link footnote-identifier-link" title="I&amp;#8217;ve had issues with things like web deployment assemblies, not prompting for workspace on startup, etc.">1</a></sup> and I&#8217;m too lazy to do the research to fix them. However, the upgrade resulted in performance issues. For instance, it hung for ~10 seconds every time I saved web.xml, and there were various random pauses. It&#8217;s not the hardware: I&#8217;m on a Core i7 Quad with 6GB RAM running  Win7 x64. I realize you are getting more tooling with STS, but performance was much worse than I experienced with 3.6.</p>
<p>Well, it had slipped my mind that I had updated my 3.6 eclipse.ini settings with those I had found in an excellent <a href="http://stackoverflow.com/questions/142357/what-are-the-best-jvm-settings-for-eclipse/3275659#3275659">Stack Overflow answer</a> from VonC on optimal JVM settings for Eclipse. It hasn&#8217;t been updated for 3.7 (nor does it mention STS), but after some experimenting and research it appears to work well for it. Here are my settings, and below I add some commentary on what they do, which is missing from the original answer (although I still suggest you read that, as it covers other situations/issues that may affect you). Keep in mind I&#8217;m not a JVM tuning expert, YMMV, etc. Here are the contents of my sts.ini:</p>
<blockquote><p>-vm<br />
C:/Java/SDKs/jdk1.6.0_24x64/bin/javaw.exe<br />
-startup<br />
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar<br />
&#8211;launcher.library<br />
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502<br />
-product<br />
com.springsource.sts.ide<br />
&#8211;launcher.defaultAction<br />
openFile<br />
&#8211;launcher.XXMaxPermSize<br />
384M<br />
-vmargs<br />
-Dosgi.requiredJavaVersion=1.6<br />
-Xmn128m<br />
-Xms256m<br />
-Xmx768m<br />
-Xss4m<br />
-XX:PermSize=128m<br />
-XX:MaxPermSize=384m<br />
-XX:CompileThreshold=1000<br />
-XX:+CMSIncrementalPacing<br />
-XX:+UnlockExperimentalVMOptions<br />
-XX:+UseG1GC<br />
-XX:+UseFastAccessorMethods</p></blockquote>
<p><strong>-XX:CompileThreshold=1000</strong><br />
This is the number of method invocations/branches before  compiling. This is normally set to 10,000, so we&#8217;re changing it dramatically, but the original suggestion was leading to errors so I raised it. You will notice on startup that it takes longer, and your CPU usage jumps. However, your performance after that is much better. Those 10s save times for web.xml? Gone after this. I&#8217;m willing to take a hit at the beginning for better productivity while coding.</p>
<p><strong>-XX:ReservedCodeCacheSize=64m</strong><br />
Related to the above, I was getting the error &#8220;Unhandled event loop exception / out of space  in CodeCache for adapters&#8221; due to setting the compile threshold to 5. This is another solution to that problem, and may be redundant.</p>
<p><strong>-Xss4m</strong><br />
This is stack size, and was previously set to 1MB, now up to 4MB per thread. Doing this will increase the overall memory used.</p>
<p><strong>-XX:+UnlockExperimentalVMOptions<br />
-XX:+UseG1GC<br />
-XX:+UseFastAccessorMethods</strong><br />
These enable parallel garbage collection. I saw my CPU utilization reach 100% after this, which is rare on a Core i7 Quad. It felt like I was finally using it to its potential.</p>
<p>Again, I&#8217;m not an expert. I&#8217;ve found it&#8217;s more sluggish at first, but response times quickly improve. For me, it&#8217;s a clear net gain. Not documented are the things I turned off in preferences because I wasn&#8217;t using them (Maven is disconnected, etc.). Visit Windows &gt;&gt; Preferences and filter on startup, see if there&#8217;s anything you can get rid of. Finally, I must give credit to my sources outside the original article:</p>
<p><a href="http://ugosan.org/speeding-up-eclipse-a-bit-with-unlockexperimentalvmoptions/">http://ugosan.org/speeding-up-eclipse-a-bit-with-unlockexperimentalvmoptions/</a><br />
<a href="http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html"></a></p>
<p><a href="http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html">http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html</a><br />
<a href="http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html"></a></p>
<p><a href="http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html">http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html</a><br />
<a href="http://performance.netbeans.org/howto/jvmswitches/"></a></p>
<p><a href="http://performance.netbeans.org/howto/jvmswitches/">http://performance.netbeans.org/howto/jvmswitches/</a></p>
<ol class="footnotes"><li id="footnote_0_146" class="footnote">I&#8217;ve had issues with things like web deployment assemblies, not prompting for workspace on startup, etc.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://philip.yurchuk.com/2011/08/15/optimal-jvm-settings-for-sts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Deleting (undeletable) Tasks In Eclipse</title>
		<link>http://philip.yurchuk.com/2009/07/11/deleting-undeletable-tasks-in-eclipse/</link>
		<comments>http://philip.yurchuk.com/2009/07/11/deleting-undeletable-tasks-in-eclipse/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 11:27:03 +0000</pubDate>
		<dc:creator>Philip Yurchuk</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[eclipse]]></category>

		<guid isPermaLink="false">http://philip.yurchuk.com/?p=41</guid>
		<description><![CDATA[<p>I recently had some more frustration with Eclipse, with no solution on the web, so I&#8217;m posting mine.</p> <p>The problem:</p> <p>I had an auto-generated task (TODO) from creating a class that implemented an interface. At some point, I noticed the task comment was gone, but the task indicator (checkbox icon) was still there. Probably [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had some more frustration with Eclipse, with no solution on the web, so I&#8217;m posting mine.</p>
<p><strong>The problem</strong>:</p>
<p>I had an auto-generated task (TODO) from creating a class that implemented an interface. At some point, I noticed the task comment was gone, but the task indicator (checkbox icon) was still there. Probably because I have it set to reformat on save, but maybe I deleted the task comment without hitting the task button (or both). Anyway, I could not clear it no matter what:</p>
<ul>
<li>Double clicking the icon didn&#8217;t work since it couldn&#8217;t find the comment.</li>
<li>Clicking the &#8220;Clean and Redetect Tasks&#8221; button did nothing.</li>
<li>Restarting Eclipse (which I do more often than a Windows admin reboots), did naught.</li>
<li>The Task View displayed the offending tasks, but the Delete option was greyed out. Selecting the task and hitting delete 3 million times while cursing furiously at the screen brought no justice.</li>
</ul>
<p><strong>The solution</strong>:</p>
<ol>
<li>Go to Window &gt;&gt; Preferences, then Java/Compiler/Task Tags. Select the TODO task tag, or whatever accursed tag haunts you.</li>
<li>Click Remove. When it threatens a rebuild, call it&#8217;s bluff (that is, agree). When it&#8217;s done (and it took its sweet time), the offending tasks will be gone. Rejoice!</li>
<li>Click New&#8230; and restore the TODO tag. All legitimate TODO tasks will be restored.  <a title="Jabberwocky" href="http://en.wikipedia.org/wiki/Jabberwocky">Callooh! Callay!</a></li>
</ol>
<p>keywords: can&#8217;t delete tasks, task tags, eclipse 3.4, mylyn </p>
]]></content:encoded>
			<wfw:commentRss>http://philip.yurchuk.com/2009/07/11/deleting-undeletable-tasks-in-eclipse/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Eclipse &#8220;cannot be resolved to a type&#8221; error</title>
		<link>http://philip.yurchuk.com/2008/12/03/eclipse-cannot-be-resolved-to-a-type-error/</link>
		<comments>http://philip.yurchuk.com/2008/12/03/eclipse-cannot-be-resolved-to-a-type-error/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 04:43:57 +0000</pubDate>
		<dc:creator>Philip Yurchuk</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://philip.yurchuk.com/?p=25</guid>
		<description><![CDATA[<p>So I&#8217;m coding along and all of a sudden, Eclipse (3.4) can&#8217;t resolve classes. Classes that are in the same package as the class I&#8217;m editing. Classes that are fully qualified in the import statement.</p> <p>Not good.</p> <p>The last thing I had done was add a Spring @Autowired annotation. I saved the file and [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m coding along and all of a sudden, Eclipse (3.4) can&#8217;t resolve classes. Classes that are in the same package as the class I&#8217;m editing. Classes that are fully qualified in the import statement.</p>
<p>Not good.</p>
<p>The last thing I had done was add a Spring @Autowired annotation. I saved the file and voila, everything goes to crap. I then spend a stupid amount of time trying to track down the cause. I took the changes out. I did a clean and rebuild and retest (everything passed; this was Eclipse-only). I added new classes to see if they broke (they did). I did a false modify (add space, remove space, save) to see if that broke said file (it did). It was a death spiral. No matter how I changed the code, the same problem was there.</p>
<p>Turns out, it wasn&#8217;t the annotation, or anything else in Spring, or any of my code, or any of my Eclipse plugins. It was a step before that killed me. I was doing a little cleanup and I created a temp directory at the top of my project folder so I could move some files there. It wasn&#8217;t nested in anything, other than the top level directory. What could go wrong?</p>
<p>Apparently, that makes Eclipse see red. Squiggly red.</p>
<p>The solution was simply to do a refresh (F5) on my project. Just as quickly as it started, the problem went away. That smells like a bug to me, but if it was I figure I&#8217;d see a lot more mentions in Google or the Eclipse bug tracker. I&#8217;m really hoping this helps someone save some time.</p>
<p><strong>Update: If that doesn&#8217;t help you, see more solutions in the comments. Thanks to those who contributed them.</strong></p>
<p>Keywords: false error, bogus error, eclipse bug </p>
]]></content:encoded>
			<wfw:commentRss>http://philip.yurchuk.com/2008/12/03/eclipse-cannot-be-resolved-to-a-type-error/feed/</wfw:commentRss>
		<slash:comments>56</slash:comments>
		</item>
	</channel>
</rss>

