<?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>DelayToleraNt</title>
	<atom:link href="http://www.delaytolerant.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.delaytolerant.com</link>
	<description>On Mobile Systems and Programming</description>
	<lastBuildDate>Thu, 22 Oct 2009 08:04:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Android HTTP &#8211; Managing Base64 with Apache Commons Codec</title>
		<link>http://www.delaytolerant.com/android-http-managing-base64-with-apache-commons-codec/</link>
		<comments>http://www.delaytolerant.com/android-http-managing-base64-with-apache-commons-codec/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 18:27:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.delaytolerant.com/android-http-managing-base64-with-apache-commons-codec/</guid>
		<description><![CDATA[This post continues on programming HTTP within Android. In the following, I&#8217;ll show how to manage Base64 coded content in Android and how to render an image on WebView from a String that we encoded.
First, the tool to use is commons codec package from Apache. The documentation can be found here. The source is available [...]]]></description>
			<content:encoded><![CDATA[<p>This post continues on programming HTTP within Android. In the following, I&#8217;ll show how to manage Base64 coded content in Android and how to render an image on WebView from a String that we encoded.</p>
<p>First, the tool to use is commons codec package from Apache. The documentation can be found<a href="http://commons.apache.org/codec/api-release/index.html" title="Apache commons codec documentation" target="_blank"> here.</a> The source is available <a href="http://commons.apache.org/codec/download_codec.cgi" title="Apache commons codec source code">here</a>. You can just include the source of the package to your project, it is all Android compatible.</p>
<pre>
The commons codec package has also convenient method for Base64 decoding,
String imageString = "";
try {
  FileInputStream fin = openFileInput("camera.jpg");
  int jpeg_size = fin.available();
  byte[] imagedata = new byte[jpeg_size];
  fin.read(imagedata);
  byte[] encodedData = Base64.encodeBase64(imagedata);
  imageString = new String(encodedData);
  final String mimetype = "text/html";
  final String encoding = "UTF-8";
  // replace below [ with html "&lt;" and ] similarly ] with "&gt;"
  String html = "[html][body][center][img height=\"200\" width=\"200\"
         src=\"data:image/jpeg;base64,"+imageString+"\"/][/center][/body][/html]";
  mWebView.loadData(html, mimetype, encoding);
} catch (Exception e) {
  e.printStackTrace();
}</pre>
<p>There is also convenient Base64 decoding functionality in the package, which can be used for example, to decode Base64 encoded content in MIME messages, which were covered in previous post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.delaytolerant.com/android-http-managing-base64-with-apache-commons-codec/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android HTTP &#8211; Parsing Multipart MIME Documents with W3C MIME Parser</title>
		<link>http://www.delaytolerant.com/android-parsing-multipart-mime-documents-with-w3c-mime-parser/</link>
		<comments>http://www.delaytolerant.com/android-parsing-multipart-mime-documents-with-w3c-mime-parser/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 21:10:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.delaytolerant.com/android-parsing-multipart-mime-documents-with-w3c-mime-parser/</guid>
		<description><![CDATA[Parsing multipart MIME documents can be troublesome in limited Java environment like Android, J2ME, or CDC. One cannot simply use javax.mail together with activation.jar, since activation framework is not supported in these environment.  I wrote this post, because Android does not provide tools for parsing multipart MIME messages, e.g., for extracting contexts of MIME document with [...]]]></description>
			<content:encoded><![CDATA[<p>Parsing multipart MIME documents can be troublesome in limited Java environment like Android, J2ME, or CDC. One cannot simply use javax.mail together with activation.jar, since activation framework is not supported in these environment.  I wrote this post, because Android does not provide tools for parsing multipart MIME messages, e.g., for extracting contexts of MIME document with type multipart/related or multipart/mixed. A solution is to use third party MIME parser from <a href="http://www.w3.org/Jigsaw/" target="_blank" title="w3c jigsaw">W3C Jigsaw</a> project. The Jigsaw MIME parser does not contain references to classes that would cause harm in Android programs. The documentation for package is <a href="http://jigsaw.w3.org/Doc/Programmer/api/org/w3c/www/mime/package-summary.html" target="_blank" title="jigsaw documentation">here</a>. The source code packages <a href="http://jigsaw.w3.org/Distrib/" title="jigsaw source code">here</a>.</p>
<p>A small explanation on usage follows: First, let&#8217;s parse the top-level header to get boundary token:</p>
<pre>
MimeHeadersFactory headFactory = new MimeHeadersFactory();
MimeParser mp = new MimeParser(bin,headFactory);
byte [] boundary = null;

try {
  MimeHeaders mh = (MimeHeaders)mp.parse();
  Enumeration e = mh.enumerateHeaders();
  while(e.hasMoreElements()){
    String key = e.nextElement().toString();
    // get the boundary, which separates parts in multipart
    if(key.equalsIgnoreCase("content-type")){
    MimeType MT = new MimeType(mh.getValue(key));
    if(MT.equiv(MimeType.MULTIPART_RELATED)){
      boundary = MT.getParameterValue("boundary").getBytes();
    }
  }
}
}catch (Exception e){
  e.printStackTrace();
}</pre>
<p>Then, let&#8217;s go through all body parts</p>
<pre>
MultipartInputStream mIS = new MultipartInputStream(mp.getInputStream(), boundary);
try {
  while(mIS.nextInputStream()){
    if (mIS.available()&gt;0){
    // create parser for each part in multipart
    MimeParser partParser = new MimeParser(mIS, headFactory);
    MimeHeaders mh = (MimeHeaders)partParser.parse();
    Enumeration e = mh.enumerateHeaders();
    while(e.hasMoreElements()){
    // do something
    }
  }
}</pre>
<p>The above should do the trick &#8211; enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.delaytolerant.com/android-parsing-multipart-mime-documents-with-w3c-mime-parser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Faster GPS Lock with N810 and Maemo Mapper</title>
		<link>http://www.delaytolerant.com/n810-gps-maemo-mapper/</link>
		<comments>http://www.delaytolerant.com/n810-gps-maemo-mapper/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 18:50:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.delaytolerant.com/n810-gps-maemo-mapper/</guid>
		<description><![CDATA[
There seems to be many complaints about the slow GPS satellite lock with N810 Internet Tablet. According to my experience, the locking time can be vastly decreased by installing the latest version of OS2008. This could be explained by that my N810 was part of the first N810 sold in the European web stores, and the [...]]]></description>
			<content:encoded><![CDATA[<p>
There seems to be many complaints about the slow GPS satellite lock with N810 Internet Tablet. According to my experience, the locking time can be vastly decreased by installing the latest version of <a href="http://tablets-dev.nokia.com/nokia_N810.php" title="latest os2008">OS2008</a>. This could be explained by that my N810 was part of the first N810 sold in the European web stores, and the OS seemed still to lack the final touch at the time of the purchase. New OS version helped!
</p>
<p>
Then, the really cool stuff was to install the <ahref="http://maemo.org/downloads/product/OS2008/maemo-mapper/" title="maemo mapper">Maemo Mapper</a> application. One motivation for this post was to link to a <a href="http://maemo.org/downloads/OS2008/travel/" target="_blank" title="meamo mapper">right page</a>, where you can just install with a single click. The initial attempts to use tablet&#8217;s own application manager failed because of missing libraries , but once the mentioned page was found it was straightforward.
</p>
<p>
Maemo Mapper uses raster maps from <a href="http://openstreetmap.org/" target="_blank" title="open street map">Open Street Map</a>. Some writings mentioned this to work well for walking and biking use. Purely vector based maps were recommended for car use where maps need to be updated more frequently.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.delaytolerant.com/n810-gps-maemo-mapper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visit in Orbit Radio Grid Testbed</title>
		<link>http://www.delaytolerant.com/orbit-radio-grid/</link>
		<comments>http://www.delaytolerant.com/orbit-radio-grid/#comments</comments>
		<pubDate>Wed, 21 May 2008 14:54:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Research]]></category>

		<guid isPermaLink="false">http://www.delaytolerant.com/orbit-radio-grid/</guid>
		<description><![CDATA[
I recently had a chance to visit an interesting wireless communication laboratory. WINLAB in Rutgers university hosts a radio grid testbed called Orbit. The testbed consists of 400 Linux boxes each equipped with 4 different radio interfaces. The researchers may get root access to all boxes, so that they are able to modify radio and [...]]]></description>
			<content:encoded><![CDATA[<p>
I recently had a chance to visit an interesting wireless communication laboratory. <a href="http://www.winlab.rutgers.edu/" target="_blank" title="WINLAB in Rutgers">WINLAB</a> in Rutgers university hosts a radio grid testbed called <a href="http://www.orbit-lab.org/" target="_blank" title="Orbit laboratory in Rutgers">Orbit.</a> The testbed consists of 400 Linux boxes each equipped with 4 different radio interfaces. The researchers may get root access to all boxes, so that they are able to modify radio and network related functionality in the kernel level.
</p>
<p>
Despite having 400*4 radios above your head, they promised that your brain should not be boiling while in the room. The black hats in the picture were an interesting detail, they cover the nodes from water leaks from pipelines or from fire extinguishers, and they have proven to be useful.
</p>
<p><a href="http://www.delaytolerant.com/wp-content/uploads/2008/05/under-orbit.jpg" title="Orbit Wireless Tesbed"><img src="http://www.delaytolerant.com/wp-content/uploads/2008/05/under-orbit.jpg" alt="Orbit Wireless Tesbed" width="400" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.delaytolerant.com/orbit-radio-grid/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Developing J2ME on Apple OSX</title>
		<link>http://www.delaytolerant.com/j2me-on-osx/</link>
		<comments>http://www.delaytolerant.com/j2me-on-osx/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 14:57:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.delaytolerant.com/j2me-on-osx/</guid>
		<description><![CDATA[
Recently, we started a small mobile programming project with my colleague. We both have Intel based MacBooks, and we were willing to use these for J2ME development. However, a SUN Wireless Tool Kit (WTK) is not supported for Darwin platform. After some Googleing, I found from Javablog a tutorial on how to develop J2ME on OSX. Below is [...]]]></description>
			<content:encoded><![CDATA[<p>
Recently, we started a small mobile programming project with my colleague. We both have Intel based MacBooks, and we were willing to use these for J2ME development. However, a SUN <a href="http://java.sun.com/products/sjwtoolkit/" target="_blank" title="SUN WTK">Wireless Tool Kit</a> (WTK) is not supported for Darwin platform. After some Googleing, I found from Javablog a tutorial on how to develop <a href="http://javablog.co.uk/2008/01/17/j2me-development-on-os-x-revisited/" target="_blank" title="J2ME on OSX">J2ME on OSX</a>. Below is a screen shot showing an J2ME application running on my MacBook.
</p>
<p><a href="http://www.delaytolerant.com/wp-content/uploads/2008/04/microemu-osx.png" title="Microemulator on OSX"><img src="http://www.delaytolerant.com/wp-content/uploads/2008/04/microemu-osx.png" alt="Microemulator on OSX" /></a> </p>
<p>
The first experiences were all positive, and <a href="http://antenna.sourceforge.net/" title="Antenna sourceforge">Antenna</a> tasks were straightforward to set up by following the tutorial. However, <span style="font-weight: bold" class="Apple-style-span">be warned,</span> the emulator does not correctly implement the HTTP(S) Connection as defined in <a href="http://java.sun.com/javame/reference/apis/jsr118/" title="MIDP API" target="_blank">JSR-118</a> MIDP API. Even the HTTPConnection of J2ME should not do automatic redirects, running our code did some redirecting on Microemulator. This may not be major issue for simple development, but forced us to continue development on Linux using SUN&#8217;s WTK where the HTTP connections worked as expected.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.delaytolerant.com/j2me-on-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>N800 Flash Storage Performance Revisited</title>
		<link>http://www.delaytolerant.com/n800-flash-performance-revisited/</link>
		<comments>http://www.delaytolerant.com/n800-flash-performance-revisited/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 15:42:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.delaytolerant.com/n800-flash-performance-revisited/</guid>
		<description><![CDATA[
Inspired  by some visibility in storagemojo.com, I decided to provide some more plots on the Flash storage performance.


Thanks for many comments.We begin our observations on measuring the write performance by Nokia N800 on its Flash storage device. The data is written and read on blocks of 512 bytes, to achieve good performance. This time I decided to use [...]]]></description>
			<content:encoded><![CDATA[<p>
Inspired  by some visibility in <a href="http://storagemojo.com/2007/10/30/flash-performance-on-a-nokia-n800/" title="storagemojo flash performance post" target="_blank">storagemojo.com,</a> I decided to provide some more plots on the Flash storage performance.
</p>
<p>
Thanks for many comments.We begin our observations on measuring the write performance <span style="font-style: italic" class="Apple-style-span">by Nokia N800</span> on its Flash storage device. The data is written and read on blocks of 512 bytes, to achieve good performance. This time I decided to use standard Linux tools for the benchmarking. 
</p>
<p><a href="http://www.delaytolerant.com/wp-content/uploads/2008/02/n800-flash-write-performance.png" title="n800 write performance"><img src="http://www.delaytolerant.com/wp-content/uploads/2008/02/n800-flash-write-performance.png" alt="n800 write performance" /></a>  </p>
<p>
So, the first observation is that we achieve write performance close to 1Mbit/s for small (less than 1 MB) files. In the write performance test the Linux command dd was used to copy files from /dev/urandom to a destination file in the Flash storage. The operation was timed by using /usr/bin/time, since the default dd command on N800 did not provide timing statistics.
</p>
<p><img src="http://www.delaytolerant.com/wp-content/uploads/2008/02/n800-flash-read-performance.png" alt="n800 read performance" />  </p>
<p>
The above figure shows the read performance from the N800 Internet tablet. For the read test I used dd to transfer data from a file on the Flash storage to /dev/null. Now we can see that the read bandwidth is in the order of 250 Mbit/s.So what can we conclude from the graphs. We are looking on just a single device, and especially a mobile device where the processing power of the device may prevent us from achieving the highest performance provided by the Flash storage. So the results are not very generic. Also, the read performance is much better than for writing and is certainly enough to play movies. The write performance instead, is poor and would not allow the user to receive large files with the full bandwidth achievable by the device&#8217;s WLAN.For now, this should be it for the N800 benchmarking, since we have already the great new N810 at hand.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.delaytolerant.com/n800-flash-performance-revisited/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flashing N810 with OSX</title>
		<link>http://www.delaytolerant.com/flashing-n810-osx/</link>
		<comments>http://www.delaytolerant.com/flashing-n810-osx/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 15:04:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.delaytolerant.com/flashing-n810-osx/</guid>
		<description><![CDATA[The new N810 which I got last week, could not install Skype application because of some old Hildon libraries. So re-installing the operating system on N810 was needed.
To flash the OS on Intel based MacBook, you can still use the old flasher application available here. Then you should follow the N810 instructions form here. With [...]]]></description>
			<content:encoded><![CDATA[<p>The new N810 which I got last week, could not install Skype application because of some old Hildon libraries. So re-installing the operating system on N810 was needed.</p>
<p>To flash the OS on Intel based MacBook, you can still use the old flasher application available <a href="http://tablets-dev.nokia.com/d3.php?f=flasher-2.0.macosx" title="n810-flasher-osx" target="_blank">here</a>. Then you should follow the N810 instructions form <a href="http://maemo.org/community/wiki/HOWTO_FlashLatestNokiaImageWithLinux" title="n810-flasher-instructions" target="_blank">here</a>. With one exception, there is a trick on the order of doing the stuff. First, connect the USB. At this point, change execution rights for the flasher, enter the command to start the flasher as sudo (either sudo su, or do something as sudo, so that you won&#8217;t need to stop to type the password later when there is only seconds of time to act). Now, enter the command and be ready to hit the &#8220;Enter&#8221; (but do not hit it yet). Now plug the power cable to start the N810, and when you will see the USB logo in the N810 hit the enter. You see the flasher to complete and you are done &#8211; have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.delaytolerant.com/flashing-n810-osx/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Nokia N810 &#8211; First Experiences</title>
		<link>http://www.delaytolerant.com/n810-brand-new/</link>
		<comments>http://www.delaytolerant.com/n810-brand-new/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 22:53:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.delaytolerant.com/n810-brand-new/</guid>
		<description><![CDATA[Hmm, away from blogging for a while. Just got my brand new Nokia N810 last Friday. Waiting to get developing on the gadget. The first impressions are that THIS IS THE PRODUCT. The gadget arrived with very nice packaging.  Pulling the nicely finished aluminum chassis out from the leather pocket gave luxurious feeling. The [...]]]></description>
			<content:encoded><![CDATA[<p>Hmm, away from blogging for a while. Just got my brand new Nokia N810 last Friday. Waiting to get developing on the gadget. The first impressions are that THIS IS THE PRODUCT. The gadget arrived with very nice packaging.  Pulling the nicely finished aluminum chassis out from the leather pocket gave luxurious feeling. The user interface was superb. All-in-all, the first impression is that this is <em>the</em> travel replacement for your laptop. In addition, the N810 makes the older N800 look like a prototype, including the protecting pocket which has changed from the cheap fabric to nice leather. And the maps are Terrific!</p>
<p>The evolution from N770 to N810 via N800 illustrates nicely  how to make a consumer product.</p>
<p>However, the manufacturer has still something to improve. Trying to start the Skype application resulted in information which leas to firmware update (some Hildon framework libs are not anymore compatible with the latest Skype.). This kind of  &#8220;need to do some hacking&#8221; stuff should not appear when you pull out your new shiny device from the nicely finished box.</p>
<p>And final notes: My PSU (thermaltake 420W) blew up during  the Christmas holiday, and I am waiting for the  replacement to arrive. After, the benchmarks on Flash performance will be published. This time I used real *nix kin of methods (/usr/bin/time, /dd, and like) to do the measurements. Let&#8217;s get back&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.delaytolerant.com/n810-brand-new/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Storage Performance on a Mobile Device</title>
		<link>http://www.delaytolerant.com/mobile-storage-performance/</link>
		<comments>http://www.delaytolerant.com/mobile-storage-performance/#comments</comments>
		<pubDate>Thu, 25 Oct 2007 20:10:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.delaytolerant.com/mobile-storage-performance/</guid>
		<description><![CDATA[I have been following writings on flash storage performance from storagemojo blog. Now, that I had a little time to sit down and a Nokia N800 at hand it was time to do a small experiment. I ran some benchmarks with a Java program that creates random data (in chunks of kilobyte) and writes the [...]]]></description>
			<content:encoded><![CDATA[<p>I have been following writings on flash storage performance from <a href="http://storagemojo.com/category/ssdflash-disk/" title="storage mojo flash disk" target="_blank">storagemojo</a> blog. Now, that I had a little time to sit down and a Nokia N800 at hand it was time to do a small experiment. I ran some benchmarks with a Java program that creates random data (in chunks of kilobyte) and writes the data to a file. For comparison I ran the same program with the cheapest Intel based MacBook available using Java 1.4. I used the same source level and the same Java binary that I used on N800 running Java CDC.</p>
<p>So, the comparison does not measure only storage performance, but also Java. Anyways, storage performance counts often only when some application is using the storage, and this application might as well be written on Java. In the tests, each size of file was created consecutively 10 times and average was calculated. For file size of 0 kB I measured only time to create an empty file. So here we go with the results:</p>
<p><a href="http://www.delaytolerant.com/wp-content/uploads/2007/10/flash-performance.png" title="Flash storage performance N800"><img src="http://www.delaytolerant.com/wp-content/uploads/2007/10/flash-performance.png" alt="Flash storage performance N800" /></a></p>
<p><strong>Update:</strong> After seeing a <a href="http://storagemojo.com/2007/10/30/flash-performance-on-a-nokia-n800/" title="staragemojo post on n800" target="_blank">post</a> referring to my benchmark, I felt urgent need to look into an independent benchmark and see whether I had been writing nonsense or not. Using my home desktop and connecting via a WLAN router I copied several files of different sizes (100kB to 1MB as in the above benchmark) by using secure copy over ssh. Now, the average bandwidth of 10 transfers was 278 KB/s. From this, we can calculate copy time of 1.84 s for 512KB file and 3.68 s for a file of 1 MB. These figures have very similar order of magnitude than my earlier measurements with mobile Java.</p>
<p>Today, the tests only included local file creation but there is more to come. I am interested on looking into combined wireless download and write performance (and to compare this somehow with iPod  Touch) as well as read performance the applications experience from the local storage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.delaytolerant.com/mobile-storage-performance/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mobile Java, Logging, and Reflection</title>
		<link>http://www.delaytolerant.com/cdc-logging-reflection/</link>
		<comments>http://www.delaytolerant.com/cdc-logging-reflection/#comments</comments>
		<pubDate>Wed, 24 Oct 2007 12:55:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.delaytolerant.com/cdc-logging-reflection/</guid>
		<description><![CDATA[I started porting a Java client application on Nokia N800 on which I had installed Java CDC (binary). Quite soon after starting the building, I noticed that the log4j libraries are not going to work on CDC device because of lack of support for reflection API. For this I removed (with some python scripting and [...]]]></description>
			<content:encoded><![CDATA[<p>I started porting a Java client application on Nokia N800 on which I had installed Java CDC (<a href="http://wiki.java.net/bin/view/Mobileandembedded/PhoneMEAdvancedPlatformsNokia800" title="Java CDC for N800" target="_blank">binary</a>). Quite soon after starting the building, I noticed that the log4j libraries are not going to work on CDC device because of lack of support for reflection API. For this I removed (with some python scripting and manual fixing) all the logging information from the project, and managed to build and run the project without log4j dependency.</p>
<p>However, some of the libraries in my project used commons-logging library, and I was very lucky to find a <a href="http://imbert.matthieu.free.fr/jgroups-cdc/" title="CDC commons-logging">patched version</a>, which enables running commons-logging on J2ME (Java CDC) device.</p>
<p>You can find information on how to build Java projects to run on different platforms, from <a href="http://ant.apache.org/manual/CoreTasks/javac.html" title="ant javac compiler" target="_blank">here</a>. I modified the javac task, by adding compiler, source and target definitions as follows to make code that runs on CDC Java.</p>
<pre>
<code>
<javac srcdir="${src.dir}" debug="true" destdir="${classes.dir}"
                  compiler="javac1.4" source="1.4" target="1.4">
</javac>
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.delaytolerant.com/cdc-logging-reflection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
