<?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>Hacking so Existing</title>
	<atom:link href="http://dev.zhourenjian.com/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://dev.zhourenjian.com/blog</link>
	<description>Zhou Renjian's Development Blog</description>
	<lastBuildDate>Thu, 14 Jan 2010 08:25:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Implementing Gmail-alike Web Mail Client by Java2Script</title>
		<link>http://dev.zhourenjian.com/blog/2009/12/03/implementing-gmail-alike-web-mail-client-by-java2script.html</link>
		<comments>http://dev.zhourenjian.com/blog/2009/12/03/implementing-gmail-alike-web-mail-client-by-java2script.html#comments</comments>
		<pubDate>Thu, 03 Dec 2009 14:23:20 +0000</pubDate>
		<dc:creator>Zhou Renjian</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java2Script]]></category>
		<category><![CDATA[Gmail]]></category>
		<category><![CDATA[JavaMail]]></category>
		<category><![CDATA[Simple RPC]]></category>
		<category><![CDATA[WeMail]]></category>

		<guid isPermaLink="false">http://dev.zhourenjian.com/blog/?p=65</guid>
		<description><![CDATA[WeMail, this to-be-implemented Gmail-alike web mail client, is based on technologies of Java, SWT, JavaMail and Java2Script.
Before going into designing and implementing details, here are some background information.
Java2Script (J2S) Pacemaker provides an Eclipse Java to JavaScript compiler plugin and an implementation of JavaScript version of Eclipse Standard Widget Toolkit (SWT) with other common utilities, such [...]]]></description>
			<content:encoded><![CDATA[<p>WeMail, this to-be-implemented <a href="http://webuzz.im/mail/">Gmail-alike web mail client,</a> is based on technologies of Java, SWT, JavaMail and Java2Script.</p>
<p>Before going into designing and implementing details, here are some background information.</p>
<blockquote><p><a href="http://j2s.sourceforge.net/">Java2Script</a> (J2S) Pacemaker provides an Eclipse Java to JavaScript compiler plugin and an implementation of JavaScript version of Eclipse Standard Widget Toolkit (SWT) with other common utilities, such as java.lang.* and java.util.*. You can convert your SWT-base Rich Client Platform (RCP) into Rich Internet Application (RIA) by Java2Script Pacemaker.</p></blockquote>
<blockquote><p><a href="http://java.sun.com/products/javamail/">JavaMail</a> is a Java API used to receive and send email via SMTP,POP3 and IMAP. JavaMail is built into the Java EE platform, but also provides an optional package for use in Java SE.</p></blockquote>
<blockquote><p><a href="http://www.eclipse.org/swt/">SWT</a> is an open source widget toolkit for Java designed to provide efficient, portable access to the user-interface facilities of the operating systems on which it is implemented.</p></blockquote>
<blockquote><p><a href="http://code.google.com/webtoolkit/">Google Web Toolkit (GWT)</a> is an open source set of tools that allows web developers to create and maintain complex JavaScript front-end applications in Java. Other than a few native libraries, everything is Java source that can be built on any supported platform with the included GWT Ant build files.</p></blockquote>
<p>Why implementing another Gmail-alike web mail client?</p>
<p>When GWT is released, lots of developers ask whether GWT will be used in Google&#8217;s major products, like Gmail, Google Reader or other products. Yeas went by, but there is still no Gmail powered by GWT. So using Java-to-JavaScript technology to build another Gmail web client should be fun for technical geeks. I choose Java2Script to build this web mail client, hoping it would help improving Java2Script toolkit.</p>
<p>I like Gmail UI, but I can not use its UI for other mail providers, like Hotmail or Yahoo! Mail. So I believe WeMail will help users doing their email jobs like receiving, composing and replying emails, in Gmail-alike UI for all mail providers.  And it will sure increase their daily email processing efficiency.</p>
<p>And there are lots of companies that might block web access to Gmail, Yahoo! Mail or other mail providers. In these cases, a web mail client for general POP/IMAP &#038; SMTP will help those users accessing emails even behind firewalls.</p>
<p>So I finally made up my mind to build it. And it was my two weeks&#8217; fun. </p>
<p>Dang, dang, dang! Here it comes WeMail &#8211; Web Mail Client for Gmail/Hotmail/Live Mail/Yahoo! Mail/AOL Mail. </p>
<p>Configureing mail servers and login:<br />
<a href="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-web-login.png"><img src="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-web-login-300x198.png" alt="wemail-web-login" title="Click for large view of wemail-web-login" width="300" height="198" class="alignnone size-medium wp-image-80" /></a></p>
<p>WeMail main window, listing emails:<br />
<a href="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-list.png"><img src="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-list-300x198.png" alt="wemail-list" title="Click for large view of wemail-list" width="300" height="198" class="alignnone size-medium wp-image-72" /></a></p>
<p>Viewing an email:<br />
<a href="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-message-viewer.png"><img src="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-message-viewer-300x198.png" alt="Click for large view of wemail-message-viewer" title="wemail-message-viewer" width="300" height="198" class="alignnone size-medium wp-image-76" /></a></p>
<p>Composing an email:<br />
<a href="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-composing.png"><img src="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-composing-300x198.png" alt="wemail-composing" title="Click for large view of wemail-composing" width="300" height="198" class="alignnone size-medium wp-image-67" /></a></p>
<p>How is this Gmail alike web mail client being implemented?</p>
<p>I use <a href="http://www.instantiations.com/windowbuilder/">WindowsBuilder Pro</a> (formerly known as SWTDesigner) to design all the UI elements. Here are screenshots of its UI components being designed:</p>
<p>Overview of WeMail in designer:<br />
<a href="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-design-overview.png"><img src="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-design-overview-300x180.png" alt="wemail-design-overview" title="Click for large view of wemail-design-overview" width="300" height="180" class="alignnone size-medium wp-image-69" /></a></p>
<p>Designing top menu bar:<br />
<a href="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-menubar.png"><img src="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-menubar-300x60.png" alt="Click for large view of wemail-menubar" title="wemail-menubar" width="300" height="60" class="alignnone size-medium wp-image-75" /></a></p>
<p>Designing logo and search bar:<br />
<a href="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-toolbar.png"><img src="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-toolbar-300x76.png" alt="wemail-toolbar" title="Click for large view of wemail-toolbar" width="300" height="76" class="alignnone size-medium wp-image-78" /></a></p>
<p>Designing left side widget:<br />
<a href="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-widget.png"><img src="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-widget-300x89.png" alt="wemail-widget" title="Click for large view of wemail-widget" width="300" height="89" class="alignnone size-medium wp-image-81" /></a></p>
<p>Designing email selector bar:<br />
<a href="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-selector.png"><img src="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-selector-300x57.png" alt="wemail-selector" title="Click for large view of wemail-selector" width="300" height="57" class="alignnone size-medium wp-image-77" /></a></p>
<p>Designing email message header:<br />
<a href="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-mail-header.png"><img src="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-mail-header-300x104.png" alt="wemail-mail-header" title="Click for large view of wemail-mail-header" width="300" height="104" class="alignnone size-medium wp-image-74" /></a></p>
<p>Designing email message viewer:<br />
<a href="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-viewer.png"><img src="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-viewer-300x119.png" alt="wemail-viewer" title="Click for large view of wemail-viewer" width="300" height="119" class="alignnone size-medium wp-image-79" /></a></p>
<p>Designing email composer:<br />
<a href="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-composer.png"><img src="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-composer-300x137.png" alt="wemail-composer" title="Click for large view of wemail-composer" width="300" height="137" class="alignnone size-medium wp-image-66" /></a></p>
<p>Designing footer panel:<br />
<a href="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-footer.png"><img src="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-footer-300x83.png" alt="wemail-footer" title="Click for large view of wemail-footer" width="300" height="83" class="alignnone size-medium wp-image-71" /></a></p>
<p>Designing login window:<br />
<a href="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-login-window.png"><img src="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-login-window-300x136.png" alt="wemail-login-window" title="Click for large view of wemail-login-window" width="300" height="136" class="alignnone size-medium wp-image-73" /></a></p>
<p>Designing mail server configuring window:<br />
<a href="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-configure-window.png"><img src="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-configure-window-300x188.png" alt="wemail-configure-window" title="Click for large view of wemail-configure-window" width="300" height="188" class="alignnone size-medium wp-image-68" /></a></p>
<p>Designing and adjust user interfaces causes lots of time. </p>
<p>And what about the receiving and sending emails? I use JavaMail to do email jobs. Between SWT UI and JavaMail, <a href="http://inside.java2script.com/2007/05/23/what-is-java2scripts-simplerpc.html">Java2Script&#8217;s Simple RPC</a> <a href="http://inside.java2script.com/2007/06/02/tutorial-of-java2script-swt-and-simple-rpc-application.html">technology</a> is used. Those mail jobs are separated into following RPCs:<br />
1. CheckMails<br />
2. DiscardEmails<br />
3. FetchMailContent<br />
4. ListFolderMails<br />
5. MarkMailAsRead<br />
6. SaveDraft<br />
7. SendMail</p>
<p>UI events will trigger those RPCs being called in separate threads and UI will be updates after their jobs are done.After RPCs get woven into UI elements. It is ready to be run as a native Java desktop application. So it is:</p>
<p><a href="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-desktop.png"><img src="http://dev.zhourenjian.com/blog/wp-content/uploads/wemail-desktop-300x187.png" alt="wemail-desktop" title="Click for large view of wemail-desktop" width="300" height="187" class="alignnone size-medium wp-image-70" /></a></p>
<p>Running, debugging, testing, bug-fixing, all take times. But up until now, all I do is native Java developments. No HTML, no JavaScript technologies is needed.</p>
<p>After the Java desktop version of WeMail is OK, it will be ready for being converted in an AJAX based web browser application. That is the Java2Script job (I am not going into Java2Script details, more information can be found on <a href="http://j2s.sourceforge.net/">Java2Script at Sourceforge.net.</a>): Install Java2Script Eclipse plugin and convert existed project into a Java2Script project. All those *.java files will be compiled int JavaScript automatically. Then pack all necessary files into a Servlet *.war file and deploy it into Java Servlet container server like Tomcat. And work is done. WeMail is available at <a href="http://webuzz.im/mail/">http://webuzz.im/mail/</a> .</p>
<p>So it is my WeMail&#8217;s development log. Having fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.zhourenjian.com/blog/2009/12/03/implementing-gmail-alike-web-mail-client-by-java2script.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Connect Yahoo IMAP Server by JavaMail</title>
		<link>http://dev.zhourenjian.com/blog/2009/11/29/connect-yahoo-imap-server-by-javamail.html</link>
		<comments>http://dev.zhourenjian.com/blog/2009/11/29/connect-yahoo-imap-server-by-javamail.html#comments</comments>
		<pubDate>Sun, 29 Nov 2009 10:02:45 +0000</pubDate>
		<dc:creator>Zhou Renjian</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[IMAP]]></category>
		<category><![CDATA[JavaMail]]></category>
		<category><![CDATA[Yahoo Mail]]></category>

		<guid isPermaLink="false">http://dev.zhourenjian.com/blog/2009/11/29/connect-yahoo-imap-server-by-javamail.html</guid>
		<description><![CDATA[These days, I were implementing an online web mail client for all mail services, like Gmail, Hotmail/Live Mail, Yahoo! Mail, AOL/AIM Mail. And adding Yahoo! Mail support cost me lots of time, but the solution is simple.
Yahoo! Mail provides only web access for free users and does not provide free POP3 services. You need to [...]]]></description>
			<content:encoded><![CDATA[<p>These days, I were implementing an <a href="http://webuzz.im/mail/">online web mail client for all mail services, like Gmail, Hotmail/Live Mail, Yahoo! Mail, AOL/AIM Mail</a>. And adding Yahoo! Mail support cost me lots of time, but the solution is simple.</p>
<p><a href="http://mail.yahoo.com/">Yahoo! Mail</a> provides only web access for free users and does not provide free POP3 services. You need to buy Yahoo! Mail Plus to have POP support. Not long before, Yahoo! Mail provided IMAP services for Zoho Web Mail. It means that IMAP support is free for any Yahoo! Mail users, no Yahoo! Mail Plus is needed. But Yahoo! Mail&#8217;s IMAP services is not a totally standard IMAP service. You need <a href="http://en.wikipedia.org/wiki/Yahoo!_Mail">send some special tokens</a> before you login. So a customized Thunderbird is need to Yahoo! IMAP support.</p>
<p><a href="http://java.sun.com/products/javamail/">JavaMail</a> provides a convenient way to connect mail servers by POP/IMAP/SMTP and others. Here is a &#8220;how-to&#8221; of making a little modification of JavaMail library to support Yahoo! Mail&#8217;s IMAP service.</p>
<p>1. Download sources of JavaMail<br />
2. Modify com.sun.mail.imap.IMAPStore.login(IMAPProtocol, String, String) from a <strong>private</strong> method into a <strong>protected</strong> method, because we need to override it for Yahoo! IMAP.<br />
3. Replace the compiled IMAPStore*.class files in JavaMail&#8217;s binary library file mail.jar.<br />
4. Write two classes:</p>
<pre>
public class YahooIMAPStore extends IMAPStore {

	public YahooIMAPStore(Session session, URLName url) {
		super(session, url);
	}

	@Override
	protected void login(IMAPProtocol p, String u, String pw)
			throws ProtocolException {
		Response[] r = p.command("ID (\"GUID\" \"1\")", null);
		p.notifyResponseHandlers(r);

		super.login(p, u, pw);
	}
}

public class YahooIMAPSSLStore extends IMAPSSLStore {

	public YahooIMAPSSLStore(Session session, URLName url) {
		super(session, url);
	}

	@Override
	protected void login(IMAPProtocol p, String u, String pw)
			throws ProtocolException {
		Response[] r = p.command("ID (\"GUID\" \"1\")", null);
		p.notifyResponseHandlers(r);

		super.login(p, u, pw);
	}
}
</pre>
<p>5. Modify JavaMail related codes to use overrided YahooIMAPStore:</p>
<pre>
if ("yahoo.com".equals(domain)
		|| "ymail.com".equals(domain)
		|| "rocketmail.cn".equals(domain)) {
	if (protocol == null) {
		<del datetime="2010-01-14T08:13:03+00:00">protocol = "imaps";
		host = "imap.next.mail.yahoo.com";
		port = 993;</del>

		protocol = "imap";
		host = "imap.mail.yahoo.com";
		port = 143;
	}
	if (sendProtocol == null) {
		sendProtocol = "smtps";
		sendHost = "smtp.mail.yahoo.com";
		sendPort = 587;
	}
}
...
if (host.indexOf(".yahoo.com") != -1) {
	props.setProperty("mail.imap.class", "im.webuzz.mail.YahooIMAPStore");
	props.setProperty("mail.imaps.class", "im.webuzz.mail.YahooIMAPSSLStore");
}
Session session = Session.getInstance(props, null);
if (host.indexOf(".yahoo.com") != -1) {
	session.addProvider(new Provider(Provider.Type.STORE, "imap",
		"im.webuzz.mail.YahooIMAPStore", "WeBuzz", "1.0"));
	session.addProvider(new Provider(Provider.Type.STORE, "imaps",
		"im.webuzz.mail.YahooIMAPSSLStore", "WeBuzz", "1.0"));
}

store = session.getStore(protocol);
store.connect(host, user, password);
...
</pre>
<p>Done! Enjoy Yahoo! Mail&#8217;s IMAP support by JavaMail.</p>
<p>BTW: You can test out <a href="http://webuzz.im/web-yahoo-mail/">WeBuzz&#8217;s Web Mail for Yahoo! Mail</a>, which is using JavaMail and IMAP with the above hacks.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.zhourenjian.com/blog/2009/11/29/connect-yahoo-imap-server-by-javamail.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>&#8220;Code like you won&#8217;t be there tomorrow&#8221;</title>
		<link>http://dev.zhourenjian.com/blog/2009/03/12/code-like-you-wont-be-there-tomorrow.html</link>
		<comments>http://dev.zhourenjian.com/blog/2009/03/12/code-like-you-wont-be-there-tomorrow.html#comments</comments>
		<pubDate>Thu, 12 Mar 2009 07:02:22 +0000</pubDate>
		<dc:creator>Zhou Renjian</dc:creator>
				<category><![CDATA[Project Management]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://dev.zhourenjian.com/blog/?p=58</guid>
		<description><![CDATA[Today, I came up with Doug on the Eclipse CDT&#8217;s &#8220;Code like you won&#8217;t be there tomorrow&#8220;. I liked its ending very much:
You can create the best system ever, and people will appreciate it while you&#8217;re there, but they may end up cursing you if you disappear and leave it in their laps.
]]></description>
			<content:encoded><![CDATA[<p>Today, I came up with Doug on the Eclipse CDT&#8217;s &#8220;<a href="http://cdtdoug.blogspot.com/2008/02/code-like-you-wont-be-there-tomorrow.html">Code like you won&#8217;t be there tomorrow</a>&#8220;. I liked its ending very much:</p>
<blockquote><p>You can create the best system ever, and people will appreciate it while you&#8217;re there, but they may end up cursing you if you disappear and leave it in their laps.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://dev.zhourenjian.com/blog/2009/03/12/code-like-you-wont-be-there-tomorrow.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Compiling GDB Debugger in Windows</title>
		<link>http://dev.zhourenjian.com/blog/2009/03/11/compiling-gdb-debugger-in-windows.html</link>
		<comments>http://dev.zhourenjian.com/blog/2009/03/11/compiling-gdb-debugger-in-windows.html#comments</comments>
		<pubDate>Wed, 11 Mar 2009 03:29:17 +0000</pubDate>
		<dc:creator>Zhou Renjian</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[debugger]]></category>
		<category><![CDATA[gdb]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://dev.zhourenjian.com/blog/?p=57</guid>
		<description><![CDATA[Here are the steps:

Download 7-zip, if you do not have one.
Install MinGW, please read MinGW&#8217;s Getting Started wiki. I choose manual installation:
Download at least the following (or newer) packages from the MinGW download page:

binutils
gcc-core
mingw-runtime
w32api
expat

Unpack them directly to D:\mingw

Expat

GDB can use the Expat XML parsing library.  This library may be included with your operating system [...]]]></description>
			<content:encoded><![CDATA[<p>Here are the steps:</p>
<ol>
<li>Download <a href="http://www.7-zip.org/">7-zip</a>, if you do not have one.</li>
<li>Install MinGW, please read <a href="http://www.mingw.org/wiki/Getting_Started">MinGW&#8217;s Getting Started</a> wiki. I choose manual installation:
<p>Download at least the following (or newer) packages from the MinGW download page:</p>
<ul>
<li>binutils</li>
<li>gcc-core</li>
<li>mingw-runtime</li>
<li>w32api</li>
<li>expat</li>
</ul>
<p>Unpack them directly to D:\mingw</p>
<blockquote><dl compact="compact">
<dt>Expat</dt>
<dd>
GDB can use the Expat XML parsing library.  This library may be included with your operating system distribution; if it is not, you can get the latest version from <a href="http://expat.sourceforge.net">http://expat.sourceforge.net</a>.<br />
The <tt>`configure'</tt> script will search for this library in several standard locations; if it is installed in an unusual path, you can use the <samp>`&#8211;with-libexpat-prefix&#8217;</samp> option to specify its location.</p>
<p>Expat is used for:</p>
<ul>
<li>
Remote protocol memory maps (see section <a href="http://sources.redhat.com/gdb/onlinedocs/gdb_33.html#SEC737">D.12 Memory Map Format</a>)
</li>
<li>
Target descriptions (see section <a href="http://sources.redhat.com/gdb/onlinedocs/gdb_35.html#SEC745">F. Target Descriptions</a>)
</li>
<li>
Remote shared library lists (see section <a href="http://sources.redhat.com/gdb/onlinedocs/gdb_33.html#SEC736">D.11 Library List Format</a>)
</li>
<li>
MS-Windows shared libraries (see  <a href="http://sources.redhat.com/gdb/onlinedocs/gdb_16.html#Shared%20Libraries">Shared Libraries</a>)
</li>
</ul>
</dd>
</dl>
</blockquote>
<p>To download expat for MinGW, please visit <a href="http://sourceforge.net/project/showfiles.php?group_id=204414&#038;package_id=263032&#038;release_id=648913">here</a>.</p>
<p>For more about expat, please visit <a href="http://sources.redhat.com/gdb/onlinedocs/gdb_31.html">http://sources.redhat.com/gdb/onlinedocs/gdb_31.html</a>.
</li>
<li>Install <a href="http://www.mingw.org/wiki/MSYS">MinGW&#8217;s MSYS</a>:
<ul>
<li>Install MSYS DTK 1.0 in D:\mingw\1.0</li>
<li>Install MSYS Core 1.0.11. It is an archive. Unpack it in D:\mingw\1.0</li>
</ul>
</li>
<li>Setting PATH and HOME environment, and run D:\mingw\1.0\msys.bat</li>
<li>Download <a href="http://sourceware.org/gdb/download/">GDB debugger sources</a>. I use the latest repository <a href="ftp://sourceware.org/pub/gdb/snapshots/current/">snapshot</a>. And upack them to D:\mingw\1.0\home</li>
<li>./configure &#038; make</li>
</ol>
<p>You should have gdb.exe in D:\mingw\1.0\home\gdb-#.#.#\gdb\ in about 30 minutes.</p>
<p>To port GDB debugger to a new architecture, you should not miss the detailed guide &#8221; <a href="http://www.embecosm.com/download/ean3.html">Howto: Porting the GNU Debugger &#8212; Practical Experience with the OpenRISC 1000 Architecture</a> &#8220;.</p>
<p>Update:</p>
<p>To compile GDB Insight 6.8 under MSYS environment, you should make a <a href="http://sourceware.org/ml/gdb-patches/2008-04/msg00214.html">patch</a> :</p>
<p>Index: gdb/ChangeLog<br />
===================================================================<br />
RCS file: /cvs/src/src/gdb/ChangeLog,v<br />
retrieving revision 1.9174.2.20<br />
diff -u -r1.9174.2.20 ChangeLog<br />
&#8212; ChangeLog   31 Mar 2008 03:40:42 -0000   1.9174.2.20<br />
+++ ChangeLog   11 Apr 2008 09:10:13 -0000<br />
@@ -1,3 +1,8 @@<br />
+2008-04-11  Hans Kester  <kester.hans@gmail.com><br />
+<br />
+   * configure.ac: Added configdir for MinGW.<br />
+   * configure:    Added configdir for MinGW.<br />
+<br />
 2008-03-30  Daniel Jacobowitz  <dan@codesourcery.com></p>
<p>    * ia64-tdep.c (examine_prologue): Correct array access.</p>
<p>Index: gdb/configure.ac<br />
===================================================================<br />
RCS file: /cvs/src/src/gdb/configure.ac,v<br />
retrieving revision 1.64<br />
diff -u -r1.64 configure.ac<br />
&#8212; configure.ac   13 Jan 2008 12:23:05 -0000   1.64<br />
+++ configure.ac   11 Apr 2008 09:02:13 -0000<br />
@@ -1445,7 +1445,7 @@<br />
 AC_SUBST(WIN32LDAPP)</p>
<p> case &#8220;${host}&#8221; in<br />
-*-*-cygwin*)<br />
+*-*-cygwin* | *-*-mingw*)<br />
     configdir=&#8221;win&#8221;<br />
     ;;<br />
 *)</p>
<p>Index: gdb/configure<br />
===================================================================<br />
RCS file: /cvs/src/src/gdb/configure,v<br />
retrieving revision 1.242<br />
diff -u -r1.242 configure<br />
&#8212; configure   13 Jan 2008 12:23:04 -0000   1.242<br />
+++ configure   11 Apr 2008 09:05:54 -0000<br />
@@ -23080,7 +23080,7 @@</p>
<p> case &#8220;${host}&#8221; in<br />
-*-*-cygwin*)<br />
+*-*-cygwin* | *-*-mingw*)<br />
     configdir=&#8221;win&#8221;<br />
     ;;<br />
 *)</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.zhourenjian.com/blog/2009/03/11/compiling-gdb-debugger-in-windows.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Export Eclipse Plugin, Assert Errors</title>
		<link>http://dev.zhourenjian.com/blog/2008/07/23/export-eclipse-plugin-assert-errors.html</link>
		<comments>http://dev.zhourenjian.com/blog/2008/07/23/export-eclipse-plugin-assert-errors.html#comments</comments>
		<pubDate>Wed, 23 Jul 2008 09:55:07 +0000</pubDate>
		<dc:creator>Zhou Renjian</dc:creator>
				<category><![CDATA[Bug Fix]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[PDE]]></category>

		<guid isPermaLink="false">http://dev.zhourenjian.com/blog/?p=56</guid>
		<description><![CDATA[Here is my scenario:
I import Eclipse RSE( Remote System Explorer) plug-ins into my workspace and I want to build and test it myself. There are no errors in the workspace and running and debugging is all OK. And I want to export these plug-ins out: Export->Plug-in Development->Deployable plug-ins and fragements -> &#8230; An error dialog [...]]]></description>
			<content:encoded><![CDATA[<p>Here is my scenario:<br />
I import Eclipse <a href="http://www.eclipse.org/dsdp/tm">RSE( Remote System Explorer)</a> plug-ins into my workspace and I want to build and test it myself. There are no errors in the workspace and running and debugging is all OK. And I want to export these plug-ins out: Export->Plug-in Development->Deployable plug-ins and fragements -> &#8230; An error dialog tells me that &#8220;Error occurred during the operation. A zip file containing the build logs has been generated and placed at &#8230;&#8221;. And exact that *.zip file and there is a @dot.bin.log, saying something like:<br />
<code>4. WARNING in D:\eclipse\workspace\org.eclipse.rse.core \src\org\eclipse\rse\core\ SystemTypeMatcher.java (at line 31)<br />
	assert pattern != null;<br />
	^^^^^^<br />
'assert' should not be used as an identifier, since it is a reserved keyword from source level 1.4 on<br />
----------<br />
5. ERROR in D:\eclipse\workspace\org.eclipse.rse.core \src\org\eclipse\rse\core\ SystemTypeMatcher.java (at line 31)<br />
	assert pattern != null;<br />
	               ^^<br />
Syntax error on token "!=", = expected<br />
</code><br />
I know this error. But I already set the Compiler Compliance Level to 1.5 already, and in the workspace there is no errors complaining about this.</p>
<p>Googling all over the net and there is no clear solution to solve this problem. Someone says that modifying ANT script build.xml by adding source=&#8221;1.4&#8243; will solve this problem. But the problem is that using Export->&#8230; the build.xml will always be regenerated.</p>
<p>After reading the source of plug-in org.eclipse.pde.build, I found that there is an option for the  script generator to specify javacSource in build.xml. You can just add two lines in build.properties file like the following:<br />
<code>javacSource = 1.4<br />
javacTarget = 1.4</code><br />
And exporting plug-ins won&#8217;t have errors any more.</p>
<p>It feels great to have sources in hand when solving problems. <img src='http://dev.zhourenjian.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://dev.zhourenjian.com/blog/2008/07/23/export-eclipse-plugin-assert-errors.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Enable Line-In to Speaker for Vista</title>
		<link>http://dev.zhourenjian.com/blog/2008/07/07/enable-line-in-to-speaker-for-vista.html</link>
		<comments>http://dev.zhourenjian.com/blog/2008/07/07/enable-line-in-to-speaker-for-vista.html#comments</comments>
		<pubDate>Mon, 07 Jul 2008 12:45:03 +0000</pubDate>
		<dc:creator>Zhou Renjian</dc:creator>
				<category><![CDATA[Vista Hacks]]></category>

		<guid isPermaLink="false">http://dev.zhourenjian.com/blog/?p=53</guid>
		<description><![CDATA[Here is the hack for my Dell Inspiron 1520:
A lot of people have been reporting various versions of this issue.  In short you are not able to hear line-in audio from the computers speaker even though the meter shows an audio signal.  It seems that simply adding a registry key to enable the [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the hack for my Dell Inspiron 1520:</p>
<blockquote><p>A lot of people have been reporting various versions of this issue.  In short you are not able to hear line-in audio from the computers speaker even though the meter shows an audio signal.  It seems that simply adding a registry key to enable the input monitor will fix the problem, at least it did on my Dell Dimension 9100.  Once you add this key and reboot, you will need to enable the input monitor by going to &#8220;Control Panel&#8221; &#8211;> &#8220;Sound&#8221; &#8211;> &#8220;speakers/headphones&#8221; click on properties, then click on the &#8220;Levels&#8221; tab and enable the input monitor button.</p>
<p>That should do it, it did for me.</p>
<p>Here is the contents of the reg file I imported to fix the problem:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Windows Registry Editor Version 5.00<br />
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0000\Settings\filter\SpeakerHp]<br />
&#8220;EnableInputMonitor&#8221;=hex:01<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>You can either create a reg file with this text, or go there yourself and create the binary value.</p>
<p>Here is my standard Microsoft type warning that you should never edit the registry unless you really know what you are doing!</p></blockquote>
<p>Thanks <a href="http://www.dellcommunity.com/supportforums/view_profile?user.id=5992697">snashbar</a> very much for his/her post &#8220;<a href="http://www.dellcommunity.com/supportforums/board/message?board.id=dim_audio&#038;thread.id=73685">Possible fix for LIne-in issue with SigmaTel driver in Vista</a>&#8221;</p>
<p>P.S. After I solved the Line-in problem, I found that the Line-In is really noisy. I finally found a solution: change the level of Microphone/Line In and Microphone Boost to 0:<br />
<img src="http://dev.zhourenjian.com/blog/wp-content/uploads/eliminate-line-in-noise.png" alt="" title="eliminate-line-in-noise" width="500" height="575" class="alignnone size-full wp-image-55" /></p>
<p>P.S.2 For Mac OS X user, there is an application called &#8220;<a href="http://rogueamoeba.com/freebies/">LineIn</a>&#8221; for you to put through line-in to speaker.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.zhourenjian.com/blog/2008/07/07/enable-line-in-to-speaker-for-vista.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>VMWare Player, Ubuntu and Mac OSX</title>
		<link>http://dev.zhourenjian.com/blog/2008/06/19/vmware-player-ubuntu-and-mac-osx.html</link>
		<comments>http://dev.zhourenjian.com/blog/2008/06/19/vmware-player-ubuntu-and-mac-osx.html#comments</comments>
		<pubDate>Thu, 19 Jun 2008 13:33:05 +0000</pubDate>
		<dc:creator>Zhou Renjian</dc:creator>
				<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Leopard]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VMWare Player]]></category>

		<guid isPermaLink="false">http://dev.zhourenjian.com/blog/?p=52</guid>
		<description><![CDATA[So you want to play some other operating systems for some new features, or test your applications on other OSs? Take a try on VMWare Player. It is free.
Along with downloading and installing VMWare, you should also download OS images ( also called as Virtual Applicances). I think you should not miss Ubuntu 8.04 Desktop [...]]]></description>
			<content:encoded><![CDATA[<p>So you want to play some other operating systems for some new features, or test your applications on other OSs? Take a try on <a href="http://www.vmware.com/products/player/">VMWare Player</a>. It is <em>free</em>.</p>
<p>Along with downloading and installing VMWare, you should also download OS images ( also called as <a href="http://www.vmware.com/appliances/">Virtual Applicances</a>). I think you should not miss <a href="http://www.vmware.com/appliances/directory/1224">Ubuntu 8.04 Desktop image</a> (512M). I found that Ubuntu 8.04 running quite smoothly inside VMWare on my laptop with duo-core 2.2Ghz CPU and 2G memory. And I am lazy to install GIMP on my Vista, so running GIMP for some graphic manipulations may be one of Ubuntu jobs. And developing C++ or Java applications inside Ubuntu may be another job for me. And lots of other testing jobs. So owning an Ubuntu desktop is necessary.</p>
<p>(But I find a big inconvenience in my Ubuntu. I can input anything but having great difficulties in inputting 5 characters: &#8220;, &#8216;, ~, `, ^. I need to press that key and follow a space key to input these characters. I struggled hours to fix it but failed. So if you need a solution, please be kind to inform me.)</p>
<p>By the way, why not taking a try on Mac OSX Leopard. Download its 3.3G (expanded to 8G) <a href="http://www.mininova.org/tor/1289219">Mac OSX Leopard x86 image</a> (You should know that it is a pirate copy), following <a href="http://www.mininova.org/com/1289219">its instructions to install and patch</a>. As using VMWare Player, you have to modify *.vmx directly to load *.iso patch into Leopard:</p>
<blockquote><p>ide1:0.fileName = &#8220;D:\Downloads\Maxxuss-AMDPCNET-v1.0_1043.iso&#8221;<br />
ide1:0.deviceType = &#8220;cdrom-image&#8221;
</p></blockquote>
<p>And you may also change</p>
<blockquote><p>guestOS = &#8220;freebsd-64&#8243;</p></blockquote>
<p>to</p>
<blockquote><p>guestOS = &#8220;freebsd&#8221;</p></blockquote>
<p>So no 64-bit CPU warning in starting this x86 Mac copy.</p>
<p>Well, I feel little excitement to Leopard as it is too slow. So maybe it is just for feature peeking or some small tests. It is not ready for daily work. Hope you have enough patience for the 2-3 days&#8217; image download time and 12G hard disk spaces wasting.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.zhourenjian.com/blog/2008/06/19/vmware-player-ubuntu-and-mac-osx.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Vista Media Player Cannot Play mms:// Stream</title>
		<link>http://dev.zhourenjian.com/blog/2008/06/05/vista-media-player-cannot-play-mms-stream.html</link>
		<comments>http://dev.zhourenjian.com/blog/2008/06/05/vista-media-player-cannot-play-mms-stream.html#comments</comments>
		<pubDate>Thu, 05 Jun 2008 13:47:13 +0000</pubDate>
		<dc:creator>Zhou Renjian</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mms]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows Media Player]]></category>
		<category><![CDATA[WMP11]]></category>

		<guid isPermaLink="false">http://dev.zhourenjian.com/blog/?p=51</guid>
		<description><![CDATA[OK. Windows Media Player 11.0 (WMP 11) does not support mms:// protocol any more. So your Vista will never play mms:// stream. Stop wasting your time on searching for a solution.
If you are using XP, you may reinstall Windows Media Player 10.0. But you won&#8217;t have chance to downgrade Vista&#8217;s WMP 11 to WMP 10.
If [...]]]></description>
			<content:encoded><![CDATA[<p>OK. Windows Media Player 11.0 (WMP 11) does not support mms:// protocol any more. So your Vista will never play mms:// stream. Stop wasting your time on searching for a solution.</p>
<p>If you are using XP, you may reinstall Windows Media Player 10.0. But you won&#8217;t have chance to downgrade Vista&#8217;s WMP 11 to WMP 10.</p>
<p>If the mms:// stream seems to be working for your Vista, it&#8217;s not. In fact, the stream media server supports rstp:// protocol stream, and WMP try to rollover mms:// to rtsp:// or http://.</p>
<p>That is my conclusion after reading tons of web pages about Vista&#8217;s Media Player on mms. If my conclusion is wrong, please correct me.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.zhourenjian.com/blog/2008/06/05/vista-media-player-cannot-play-mms-stream.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>True Color Remote Desktop Connection</title>
		<link>http://dev.zhourenjian.com/blog/2008/05/21/true-color-remote-desktop-connection.html</link>
		<comments>http://dev.zhourenjian.com/blog/2008/05/21/true-color-remote-desktop-connection.html#comments</comments>
		<pubDate>Wed, 21 May 2008 12:48:24 +0000</pubDate>
		<dc:creator>Zhou Renjian</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Remote Desktop Connection]]></category>

		<guid isPermaLink="false">http://dev.zhourenjian.com/blog/?p=50</guid>
		<description><![CDATA[If you use Windows&#8217; Remote Desktop Connection a lot, you will find that the UI is a little ugly. In fact by default, the Remote Desktop Connection is in 16 bit color mode. In order to have a better experience, it would better setup a true color remote desktop connection. Here are instructions for you. [...]]]></description>
			<content:encoded><![CDATA[<p>If you use Windows&#8217; Remote Desktop Connection a lot, you will find that the UI is a little ugly. In fact by default, the Remote Desktop Connection is in 16 bit color mode. In order to have a better experience, it would better setup a true color remote desktop connection. Here are instructions for you. </p>
<p>For Windows Vista users, you already have the latest remote desktop clients, so you can make sure that your connection&#8217;s &#8220;Options&#8221; is using &#8220;High Quality (32 bit)&#8221; color in &#8220;Display&#8221; tab, and using &#8220;LAN (10Mbps or higher)&#8221; in &#8220;Experience&#8221; tab.</p>
<p>If you are using Windows Vista Professional or Windows Vista Premium, you may following similar instructions of &#8220;<a href="http://www.somelifeblog.com/2007/10/remote-desktop-video-32-bit-mode.html">Enhance Terminal Services&#8217; Color Depth by MMC</a>&#8221; to make your connection become true color (24 bit) connection. If you are using Windows Vista Home Edition, you can use registry editor to add a key as following:</p>
<blockquote><p>[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Terminal Services]<br />
&#8220;ColorDepth&#8221;=dword:00000004
</p></blockquote>
<p>Or you can download the <a href="http://dev.zhourenjian.com/blog/wp-content/uploads/VistaTerminal24bitColor.reg">registry file VistaTerminal24bitColor.reg</a> and merge it into your system.</p>
<p>If you are using Windows XP or 2003, you need to <a href="http://support.microsoft.com/kb/925876">upgrade your Terminal Services Client to 6.0</a>. And then following the above <a href="http://www.somelifeblog.com/2007/10/remote-desktop-video-32-bit-mode.html">MMC enhancement instructions</a> or add a new key in registry:</p>
<blockquote><p>
[HKEY_CURRENT_USER\Software\Policies\Microsoft\WindowsNT\Terminal Services]<br />
&#8220;ColorDepth&#8221;=dword:00000004
</p></blockquote>
<p>Or you can download the <a href="http://dev.zhourenjian.com/blog/wp-content/uploads/XPTerminal24bitColor.reg">registry file XPTerminal24bitColor.reg</a> and merge it into your system.</p>
<p>References:<br />
<a href="http://www.j79zlr.com/gphome.php">http://www.j79zlr.com/gphome.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.zhourenjian.com/blog/2008/05/21/true-color-remote-desktop-connection.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://dev.zhourenjian.com/blog/wp-content/uploads/VistaTerminal24bitColor.reg" length="294" type="audio/mpeg" />
<enclosure url="http://dev.zhourenjian.com/blog/wp-content/uploads/XPTerminal24bitColor.reg" length="298" type="audio/mpeg" />
		</item>
		<item>
		<title>Implementing Web AIM Client</title>
		<link>http://dev.zhourenjian.com/blog/2008/05/06/implementing-aim.html</link>
		<comments>http://dev.zhourenjian.com/blog/2008/05/06/implementing-aim.html#comments</comments>
		<pubDate>Tue, 06 May 2008 01:00:58 +0000</pubDate>
		<dc:creator>Zhou Renjian</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[AIM]]></category>

		<guid isPermaLink="false">http://dev.zhourenjian.com/blog/?p=49</guid>
		<description><![CDATA[Here are some notes when I was struggling to develop a web AIM client:
1. Download AIM SDK, both Windows and Linux
In Linux environment, you may already have NSS/NSPR libraries installed, if not following instructions to install it. You only need to run:
cd dist/release/
ln -s /usr/lib/libnspr4.so .
ln -s /usr/lib/libnss3.so .
ln -s /usr/lib/libnssckbi.so .
ln -s /usr/lib/libplc4.so .
ln [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some notes when I was struggling to develop a <a href="http://izuz.net/aim/">web AIM client</a>:</p>
<p>1. Download <a href="http://dev.aol.com/aim/sdk">AIM SDK</a>, both Windows and Linux<br />
In Linux environment, you may already have NSS/NSPR libraries installed, if not following <a href="http://dev.aol.com/aim/tutorials/linuxinstall">instructions</a> to install it. You only need to run:</p>
<blockquote><p>cd dist/release/<br />
ln -s /usr/lib/libnspr4.so .<br />
ln -s /usr/lib/libnss3.so .<br />
ln -s /usr/lib/libnssckbi.so .<br />
ln -s /usr/lib/libplc4.so .<br />
ln -s /usr/lib/libplds4.so .<br />
ln -s /usr/lib/libsmime3.so .<br />
ln -s /usr/lib/libsoftokn3.so .<br />
ln -s /usr/lib/libssl3.so .<br />
ln -s /usr/lib/libfreebl3.so .<br />
export LD_LIBRARY_PATH=/usr/local/tomcat/lib/
</p></blockquote>
<p>2. <a href="http://dev.aol.com/aim">Get a developer key</a> to use AIM SDK. The developer web site does not accept external email account, so create a new one. In fact, more new AIM screen names are needed, as testing AIM requires it.</p>
<p>3. Try to compile and run samples/accjsample:</p>
<blockquote><p>cd samples/accjsample<br />
javac -cp ../../dist/release/accjwrap.jar AccJSample.java Prefs.java<br />
java -cp ../../dist/release/accjwrap.jar:./ AccJSample username password developerkey
</p></blockquote>
<p>But you may get error messasge like:</p>
<blockquote><p>UNKNOWNVALUE<br />
com.aol.acc.AccException: IAccSession_SignOn<br />
        at com.aol.acc.AccSession.SignOn(Native Method)<br />
        at com.aol.acc.AccSession.signOn(AccSession.java:113)<br />
        at AccJSample.<init>(AccJSample.java:47)<br />
        at AccJSample.main(AccJSample.java:22)
</p></blockquote>
<p>But if you go into dist/release/ directory, where *.so are located, and run:</p>
<blockquote><p>/usr/local/java/bin/java -cp ../../dist/release/accjwrap.jar:../../samples/accjsample/ AccJSample username password developerkey</p></blockquote>
<p>You may get things running correctly:</p>
<blockquote><p>[5/5/08 8:34 AM]: OnStateChange: Connecting, ACC_S_OK<br />
[5/5/08 8:34 AM]: OnStateChange: Validating, ACC_S_OK<br />
[5/5/08 8:34 AM]: OnStateChange: Transferring, ACC_S_OK<br />
[5/5/08 8:34 AM]: OnStateChange: Negotiating, ACC_S_OK<br />
[5/5/08 8:34 AM]: OnStateChange: Starting, ACC_S_OK<br />
[5/5/08 8:34 AM]: OnStateChange: Online, ACC_S_OK<br />
[5/5/08 8:34 AM]: OnUserChange: ACC_S_OK<br />
&#8230;</p></blockquote>
<p>That is because *.so may not be loaded correctly if they are not in the current working directory.</p>
<p>Someone says that inaccurate time may cause problems, so run:</p>
<blockquote><p>/etc/init.d/ntpd start</p></blockquote>
<p>to synchronize your server&#8217;s time.</p>
<p>4. following, it comes to the time that developing AIM desktop client, and then converting it into Java Servlet based AIM client. So, tutorial &#8220;<a href="http://dev.aol.com/creating-aim-enabled-applications-java1">Creating AIM-Enabled Application in Java</a>&#8221; series are recommended. </p>
<p>5. And time to deploy your web AIM client to tomcat servlet container.</p>
<p>If your Tomcat 6 server is on Windows, you may need to copy all dist/release/*.dll into your %CATALINA_HOME%/bin/ folder, copy dist/release/accjwrap.jar into %CATALINA_HOME%/lib and restart Tomcat services to get things done. Deploy accjwrap.jar directly into webapps folder is not recommended, because you may want to restart your servlet application frequently while loading and unloading *.dll modules may cause &#8220;already loaded in another classloader UnsatisfiedLinkError&#8221; problems for Tomcat, which may result that you need to restart your Tomcat server.</p>
<p>If your Tomcat 6 server is on Linux, you also need to copy all dist/release/*.so into your $CATALINA_HOME/bin/ folder, copy dist/release/accjwrap.jar into $CATALINA_HOME/lib. And you need to modify your catalina.sh and add two lines:</p>
<blockquote><p>LD_LIBRARY_PATH=$CATALINA_HOME/bin<br />
cd $CATALINA_HOME/bin
</p></blockquote>
<p>And then restart Tomcat server.</p>
<p>Related links:</p>
<ul>
<li><a href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200705.mbox/%3cAEF3D568DD1D9E428048C592AA16459705E2C49C@USRV-EXCH4.na.uis.unisys.com%3e">Tomcat Native library on java.library.path </a></li>
<li><a href="http://forum.java.sun.com/thread.jspa?threadID=780109">Java Native Interface (JNI) &#8211; JNI Dll &#8211; java.library.path</a> </li>
<li><a href="http://dev.aol.com/node/995">Java Linux issues with SDK</a></li>
<li><a href="http://dev.aol.com/aim/forums/clients">AIM Custom Client Forum</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dev.zhourenjian.com/blog/2008/05/06/implementing-aim.html/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
