<?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>unbland.org blog &#187; Java</title>
	<atom:link href="http://unbland.org/blog/tag/java/feed" rel="self" type="application/rss+xml" />
	<link>http://unbland.org/blog</link>
	<description>発見の日々の備忘録。主に Web にまつまる技術ネタ。</description>
	<lastBuildDate>Wed, 18 Nov 2009 03:31:39 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>SWFProfiler を複数クライアント対応化とバグ修正</title>
		<link>http://unbland.org/blog/2009/08/20/333.html</link>
		<comments>http://unbland.org/blog/2009/08/20/333.html#comments</comments>
		<pubDate>Thu, 20 Aug 2009 12:21:32 +0000</pubDate>
		<dc:creator>muta244@admin</dc:creator>
				<category><![CDATA[Flash (ActionScript)]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Swing]]></category>
		<category><![CDATA[SWFProfiler]]></category>

		<guid isPermaLink="false">http://unbland.org/blog/?p=333</guid>
		<description><![CDATA[SWFProfiler をアップデートしました。
リリースノート
・モニタリングする対象 SWF をリストから選択出来るように機能を追加しました。
・不要なデータが混ざるのを防ぐため、サーバー  クライアント間のデータの [...]]]></description>
			<content:encoded><![CDATA[<p>SWFProfiler をアップデートしました。</p>
<p><strong>リリースノート</strong></p>
<p>・モニタリングする対象 SWF をリストから選択出来るように機能を追加しました。<br />
・不要なデータが混ざるのを防ぐため、サーバー <-> クライアント間のデータのやり取りをリモーティングからメッセージングを使ったものに変更しました。<br />
・上記に伴い、サーバーを Jetty から自前サーバーに変更しました。<br />
・サンプリングがおかしかった所を修正しました。</p>
<p><strong>ダウンロード</strong></p>
<p><del datetime="2009-11-18T03:31:20+00:00"><a href="http://unbland.org/blog/wp-content/uploads/2009/08/SWFProfiler-0.0.3.zip" target="_blank">SWFProfiler.zip (Ver. 0.0.3)</a></del><br />
<a href="http://unbland.org/blog/wp-content/uploads/2009/08/SWFProfiler-0.0.4.zip" target="_blank">SWFProfiler.zip (Ver. 0.0.4)</a></p>
<p><strong>使い方</strong></p>
<p>・SWFProfiler.jar を実行します。<br />
・監視したい対象 SWF をブラウザ上でもローカル上でもいいので開きます。<br />
・リストから対象 SWF のファイル名を選択します。</p>
<p>以上の手順でプロファイリングが可能です。</p>
<p><strong>使用に関して</strong></p>
<p>・実行には JRE 1.6+ が必要です。<br />
・FlashPlayer はデバックバージョンを使用する必要があります。<br />
・SWF はデバッグリリースされている必要があります。</p>
<p><strong>ソースコード</strong></p>
<p><a href="http://bitbucket.org/muta244/swfprofiler/" target="_blank">http://bitbucket.org/muta244/swfprofiler/</a> で bitbucket にて管理しています。</p>
<p>今回のアップデートでだいぶ使えるものになったんじゃないかと思います。ただ、バグやおかしな点もまだまだあるかと思いますので、これからもマイペースに更新していきます。ご意見・ご要望はコメント欄、もしくは bitbucket にチケット登録をお願いします。</p>
]]></content:encoded>
			<wfw:commentRss>http://unbland.org/blog/2009/08/20/333.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SWFProfiler の機能追加・バグ修正をしました</title>
		<link>http://unbland.org/blog/2009/08/16/322.html</link>
		<comments>http://unbland.org/blog/2009/08/16/322.html#comments</comments>
		<pubDate>Sat, 15 Aug 2009 16:41:06 +0000</pubDate>
		<dc:creator>muta244@admin</dc:creator>
				<category><![CDATA[Flash (ActionScript)]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[SWFProfiler]]></category>
		<category><![CDATA[Swing]]></category>
		<category><![CDATA[Tool]]></category>

		<guid isPermaLink="false">http://unbland.org/blog/?p=322</guid>
		<description><![CDATA[
先日リリースした SWFProfiler ですが、みなさん動いてなかったかと思います（ですよね？）。なので、修正版をリリースしました。ついでにモニター結果のフィルタリング機能と、定期的にガベージコレクションを自動で行う [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://unbland.org/blog/wp-content/uploads/2009/08/SWFProfiler_Capture02.jpg" alt="SWFProfiler_Capture02" title="SWFProfiler_Capture02" width="500" height="435" class="alignnone size-full wp-image-323" /></p>
<p>先日リリースした SWFProfiler ですが、みなさん動いてなかったかと思います（ですよね？）。なので、修正版をリリースしました。ついでにモニター結果のフィルタリング機能と、定期的にガベージコレクションを自動で行う機能を追加しています。</p>
<p><strong>ダウンロード</strong></p>
<p><del datetime="2009-11-18T03:29:12+00:00"><a href="http://unbland.org/blog/wp-content/uploads/2009/08/SWFProfiler-0.0.2.zip" target="_blank">SWFProfiler.zip (Ver. 0.0.2)</a><br />
<strong>＊ リンク先を間違えていたので修正しました。（&#8217;09.08.16）</strong></del><br />
<a href="http://unbland.org/blog/wp-content/uploads/2009/08/SWFProfiler-0.0.4.zip" target="_blank">SWFProfiler.zip (Ver. 0.0.4)</a><br />
<strong>＊ バグ修正版。（&#8217;09.11.18）</strong></p>
<p>あと、ブラウザ版にしろ、ローカル版にしろ、Flash Player はデバッグ版がインストールされている必要があります。それと、SWF 自体もデバッグモードで書き出されている必要がありますので、この点だけご注意下さい。</p>
<p>不明な点やバグ報告などありましたら、ぜひコメント欄へお願いします！</p>
]]></content:encoded>
			<wfw:commentRss>http://unbland.org/blog/2009/08/16/322.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SWFProfiler を試しに公開してみます</title>
		<link>http://unbland.org/blog/2009/08/13/314.html</link>
		<comments>http://unbland.org/blog/2009/08/13/314.html#comments</comments>
		<pubDate>Thu, 13 Aug 2009 13:52:14 +0000</pubDate>
		<dc:creator>muta244@admin</dc:creator>
				<category><![CDATA[Flash (ActionScript)]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[SWFProfiler]]></category>
		<category><![CDATA[Swing]]></category>
		<category><![CDATA[Tool]]></category>

		<guid isPermaLink="false">http://unbland.org/blog/?p=314</guid>
		<description><![CDATA[Flex Builder が無くてもデバッグ環境が必要だと思うので作りました。今の機能は Flex Builder プロファイラのライブオブジェクト相当のみです。Windows, Mac, Linux 全てで使用出来ます [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_313" class="wp-caption alignnone" style="width: 510px"><img src="http://unbland.org/blog/wp-content/uploads/2009/08/SWFProfilerCapture01.jpg" alt="SWFProfiler のキャプチャ画像" title="SWFProfilerCapture01" width="500" height="421" class="size-full wp-image-313" /><p class="wp-caption-text">SWFProfiler のキャプチャ画像（nium さんの kujaku を勝手にプロファイリングw）</p></div>
<p>Flex Builder が無くてもデバッグ環境が必要だと思うので作りました。今の機能は Flex Builder プロファイラのライブオブジェクト相当のみです。Windows, Mac, Linux 全てで使用出来ますが、Swing で開発してるので <a href="http://java.com/ja/" target="_blank">JRE 1.6+</a> が必要です。</p>
<p><strong>ダウンロード</strong></p>
<p><del datetime="2009-08-16T05:13:41+00:00">SWFProfiler.zip (Ver. 0.0.1)</del></p>
<p>※ <strong>このバージョンは正しく動作しませんので、<a href="http://unbland.org/blog/2009/08/16/322.html">新しいバージョンをリリース</a>しました。そちらをお使い下さい。</strong></p>
<p><strong>使い方</strong></p>
<p>SWFProfiler.jar を起動した後、監視対象の SWF を開く（ブラウザ上でも可）と監視が始まります。現状では、複数の SWF を同時に開いているとおかしな事になるので、SWF は監視対象一つのみを開くようにして下さい。<a href="http://labs.anthill.jp/2009/03/flaprofiler_02.html" target="_blank">FlaProfiler</a> とほぼ同じです。</p>
<p><strong>今後の予定</strong></p>
<p>・複数の SWF 対応<br />
・モニター結果のフィルタリング機能<br />
・コンソール機能<br />
・メモリ使用状況のグラフ表示<br />
・国際化</p>
<p>あとは Mac で文字列なカラムでソートすると、何故かちらつくんですよね。Win だと大丈夫。Swing の問題だとは思うんだけど、対処法がないか模索中。</p>
<p>さて、どこまで出来るかな。</p>
]]></content:encoded>
			<wfw:commentRss>http://unbland.org/blog/2009/08/13/314.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac では Swing で SingleFrameApplication#shutdown() が呼ばれない時がある</title>
		<link>http://unbland.org/blog/2009/08/11/309.html</link>
		<comments>http://unbland.org/blog/2009/08/11/309.html#comments</comments>
		<pubDate>Tue, 11 Aug 2009 13:47:47 +0000</pubDate>
		<dc:creator>muta244@admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Swing]]></category>

		<guid isPermaLink="false">http://unbland.org/blog/?p=309</guid>
		<description><![CDATA[Swing のメモ。
Swing を使ったアプリでは SingleFrameApplication#shutdown() をオーバーライドして終了処理を記述する。この時、Windows ではクローズボタンで終わろうが、A [...]]]></description>
			<content:encoded><![CDATA[<p>Swing のメモ。</p>
<p>Swing を使ったアプリでは SingleFrameApplication#shutdown() をオーバーライドして終了処理を記述する。この時、Windows ではクローズボタンで終わろうが、Alt+F4 で終わろうが、強制終了で終わろうが、ちゃんと shutdown() が最後に呼び出される。しかし、Mac だと正しく shutdown() が呼び出されない時がある。File -> Exit で終了した時など GUI 上で終了させた時は問題ないが、Cmd+Q や強制終了で JVM ごと終わらせた時には shutdown() が呼び出されず、終了処理が行えない。</p>
<p>そんな時の対処法が以下。</p>
<p>[java]<br />
@Override<br />
protected void startup()<br />
{<br />
    Runtime.getRuntime().addShutdownHook(new Thread()<br />
    {<br />
        public void run()<br />
        {<br />
            if (!shutdowned) {<br />
                shutdown();<br />
            }<br />
        }</p>
<p>        // 通常の起動処理<br />
        &#8230;<br />
    });<br />
}</p>
<p>@Override<br />
protected void shutdown()<br />
{<br />
    if (shutdowned) {<br />
        return;<br />
    }</p>
<p>    super.shutdown();</p>
<p>    shutdowned = true;<br />
}<br />
[/java]</p>
<p>このやり方が正しいのかは分からないけど、Runtime#addShutdownHook() なら Mac でも shutdown() を呼び出せるので終了処理がきちんと行える。Swing はシステム関係無くアプリ開発出来ることを謳ってるので、結構この問題はクリティカルだと思う。Sun さんの修正を期待。</p>
<p>こんなエントリー、ActionScript と関係無さそうだけど、Flash 開発のために必要なことをやっているのです&#8230;。</p>
]]></content:encoded>
			<wfw:commentRss>http://unbland.org/blog/2009/08/11/309.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jar Bundler を使った .jar -&gt; .app 時のメモ</title>
		<link>http://unbland.org/blog/2009/07/31/304.html</link>
		<comments>http://unbland.org/blog/2009/07/31/304.html#comments</comments>
		<pubDate>Fri, 31 Jul 2009 09:48:09 +0000</pubDate>
		<dc:creator>muta244@admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[Swing]]></category>

		<guid isPermaLink="false">http://unbland.org/blog/?p=304</guid>
		<description><![CDATA[個人的なメモ。
Jar Bundler で .jar を .app にパッケージングする際の注意点。

この画面で &#8220;Use Macintosh Menu Bar&#8221; にチェック入れてても、Swin [...]]]></description>
			<content:encoded><![CDATA[<p>個人的なメモ。</p>
<p>Jar Bundler で .jar を .app にパッケージングする際の注意点。</p>
<p><img class="alignnone size-full wp-image-303" title="Jar Bundler のキャプチャ 1" src="http://unbland.org/blog/wp-content/uploads/2009/07/2bfc96a45921677282a36721a07709ca.png" alt="Jar Bundler のキャプチャ 1" width="500" height="462" /></p>
<p>この画面で &#8220;Use Macintosh Menu Bar&#8221; にチェック入れてても、Swing を使ったアプリケーションだとウインドウ上部にメニューが表示されず、フレーム内部に表示されてしまう。対処法は以下。</p>
<p><img class="alignnone size-full wp-image-305" title="Jar Bundler のキャプチャ 2" src="http://unbland.org/blog/wp-content/uploads/2009/07/427feeba2c3a5b495c286f27ae1fdcc3.png" alt="Jar Bundler のキャプチャ 2" width="500" height="462" /></p>
<p>この画面の一番下でしているように、プロパティに &#8220;apple.laf.useScreenMenuBar&#8221; を true に設定して書き出せばスクリーン上部にメニューが表示されるようになる。</p>
]]></content:encoded>
			<wfw:commentRss>http://unbland.org/blog/2009/07/31/304.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.508 seconds -->
