<?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>Kraft Kennedy &#124; Technology Blog &#187; Java</title>
	<atom:link href="http://blogs.kraftkennedy.com/index.php/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.kraftkennedy.com</link>
	<description>Trends and insight into legal technology, infrastructure and strategic thinking.</description>
	<lastBuildDate>Tue, 31 Jan 2012 14:24:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Introduction to BlackBerry Development</title>
		<link>http://blogs.kraftkennedy.com/index.php/2009/09/24/introduction-to-blackberry-development/</link>
		<comments>http://blogs.kraftkennedy.com/index.php/2009/09/24/introduction-to-blackberry-development/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 12:03:00 +0000</pubDate>
		<dc:creator>Michael Fettner</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blogs.kraftkennedy.com/?p=694</guid>
		<description><![CDATA[Research in Motion (RIM) offers two ways of writing applications for BlackBerry devices&#8211;Native Java, and the Microsoft Visual Studio plugin.  As a VB.Net developer, I was tempted to go the Visual Studio plugin approach, but I decided against it for the following reasons: It&#8217;s geared more towards rapid forms-based applications that communicate by web services. It [...]]]></description>
			<content:encoded><![CDATA[<p>Research in Motion (RIM) offers two ways of writing applications for BlackBerry devices&#8211;Native Java, and the Microsoft Visual Studio plugin.  As a VB.Net developer, I was tempted to go the Visual Studio plugin approach, but I decided against it for the following reasons:</p>
<ul>
<li>It&#8217;s geared more towards rapid forms-based applications that communicate by web services.</li>
<li>It requires the user to be on a BlackBerry Enterprise Server.</li>
<li>It does not provide access to all of the APIs and BlackBerry features that you get with Java; for example, camera, phone, Bluetooth, address book, GPS, BlackBerry Maps, and BlackBerry Message features.</li>
<li>It doesn&#8217;t support the BlackBerry Storm touch screen and accelerometer.</li>
<li>Debugging and deployment is more difficult, and the Visual Studio plugin only comes with a BlackBerry Bold simulator.  The Java tools come with a BlackBerry Storm simulator.</li>
</ul>
<p>For these reasons, to be able to debug for the Storm, and to have access to the entire BlackBerry library, I decided to go with the Java approach.  The transition is quite easy, once you get the development environment in place and write your first test application.  The BlackBerry website has a lot of good information for developers, if you&#8217;re able to find it.</p>
<p>I found that this page has everything you need to get started developing BlackBerry applications:</p>
<p><a href="http://na.blackberry.com/eng/developers/resources/tutorials.jsp#tab_tab_development">http://na.blackberry.com/eng/developers/resources/tutorials.jsp#tab_tab_development</a></p>
<p>Rather than copy and paste information from their guides, I&#8217;ll just point out some of the things I wish were clearer in each document.</p>
<p><span id="more-694"></span></p>
<h3>Setting Up Necessary Tools</h3>
<p>First you need to install the JDK, as specified in the BlackBerry documentation.  <span style="text-decoration: underline;">However, you can skip the step get the Eclipse IDE</span>.  The Eclipse IDE is installed automatically with the BlackBerry Plug-in for Eclipse, which is mentioned in the next step.  In addition to the BlackBerry plugin for Eclipse, you&#8217;ll need to install the BlackBerry plugin for Eclipse Component Pack 4.7, in order to get the BlackBerry Storm simulator (and target the 4.7 platform), which is available here:</p>
<p><a href="http://na.blackberry.com/eng/developers/javaappdev/javaeclipseplug.jsp">http://na.blackberry.com/eng/developers/javaappdev/javaeclipseplug.jsp</a><br />
 </p>
<h3>Writing Your First Application</h3>
<p><span style="font-family: Arial">I found the Eclipse environment for Java to be very similar to Visual Studio.  If you&#8217;ve ever done any JavaScript programming, then you&#8217;ll be somewhat familiar with the syntax, and it shouldn&#8217;t be too bad to start developing in Java.  The &#8220;Writing Your First Application&#8221; guide from BlackBerry is a great first step to follow along with to create a simple test application or proof of concept.  Two things I would add are:</span></p>
<ol>
<li><span style="font-family: Arial">Creating an icon for your application&#8211;It will look much better if you pick one, rather than the default RIM folder icon.  Right click on your project in Project Explorer, and choose properties.  Click on BlackBerry Project Properties.  Click Resources, and &#8220;Add,&#8221; under Icon Files.  You can choose a png, gif, or jpg to use as your icon.</span></li>
<p> </p>
<li><span style="font-family: Arial">Creating custom backgrounds and borders&#8211;This was hard to find information on.  Basically, you have to import these classes:</span></li>
</ol>
<p style="margin-left:40px"><span style="color: red">import net.rim.device.api.ui.decor.BorderFactory;<br />
import net.rim.device.api.ui.decor.BackgroundFactory;</span></p>
<p style="margin-left:40px">Then you can add code like the following to set a background color or border:</p>
<p style="margin-left:40px"><span style="color: red">_fieldManagerTop.setBackground(BackgroundFactory.createSolidBackground(Color.LIGHTBLUE));<br />
_MyTextBox.setBorder( BorderFactory.createRoundedBorder(new XYEdges(1, 1, 1, 1) ));</span></p>
<h3><span style="font-family: Arial"><br />
How And When To Sign</span></h3>
<p><span style="font-family: Arial">I found that any realistic application you would write for a BlackBerry is going to uses classes that are restricted and need signing.  Therefore I&#8217;d suggest that you apply for the RIM code signing registration keys right away.  It took about a week for my keys to be processed.</span></p>
<h3><span style="font-family: Arial"><br />
Deploy And Distribute Applications</span></h3>
<p><span style="font-family: Arial">I found that using the BlackBerry Desktop Manager&#8217;s Application Loader feature worked well for testing purposes, however over the air deployment works best for final deployment of the application to a wider audience.</span></p>
<table border=0><tr><td width="215">
<!-- Start WP Socializer - Social Buttons - Output -->
<div class="wp-socializer 16px">
<ul class="wp-socializer-none columns-no">
 <li><a href="" title="" target="_blank"><img src="http://blogs.kraftkennedy.com/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="" style="width:16px; height:16px; background: transparent url(http://blogs.kraftkennedy.com/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -px; border:0;"/></a></li> 

 <li><a href="" title="" target="_blank"><img src="http://blogs.kraftkennedy.com/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="" style="width:16px; height:16px; background: transparent url(http://blogs.kraftkennedy.com/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -px; border:0;"/></a></li> 

 <li><a href="" title="" target="_blank"><img src="http://blogs.kraftkennedy.com/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="" style="width:16px; height:16px; background: transparent url(http://blogs.kraftkennedy.com/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -px; border:0;"/></a></li> 

 <li><a href="" title="" target="_blank"><img src="http://blogs.kraftkennedy.com/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="" style="width:16px; height:16px; background: transparent url(http://blogs.kraftkennedy.com/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -px; border:0;"/></a></li> 

 <li><a href="" title="" target="_blank"><img src="http://blogs.kraftkennedy.com/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="" style="width:16px; height:16px; background: transparent url(http://blogs.kraftkennedy.com/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -px; border:0;"/></a></li> 

 <li><a href="" title="" target="_blank"><img src="http://blogs.kraftkennedy.com/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="" style="width:16px; height:16px; background: transparent url(http://blogs.kraftkennedy.com/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -px; border:0;"/></a></li> 

 <li><a href="" title="" target="_blank"><img src="http://blogs.kraftkennedy.com/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="" style="width:16px; height:16px; background: transparent url(http://blogs.kraftkennedy.com/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -px; border:0;"/></a></li> 

 <li><a href="" title="" target="_blank"><img src="http://blogs.kraftkennedy.com/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="" style="width:16px; height:16px; background: transparent url(http://blogs.kraftkennedy.com/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -px; border:0;"/></a></li> 
</ul> 
<div class="wp-socializer-clearer"></div></div>
<!-- End WP Socializer - Social Buttons - Output -->
</td><td>
<!-- Start WP Socializer Plugin - Retweet Button -->
<script type="text/javascript">
<!--
tweetmeme_url = "http://blogs.kraftkennedy.com/index.php/2009/09/24/introduction-to-blackberry-development/"; tweetmeme_style = "compact"; tweetmeme_source = "kraftkennedy"; 

--></script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
<!-- End WP Socializer Plugin - Retweet Button -->
</td></tr></table>]]></content:encoded>
			<wfw:commentRss>http://blogs.kraftkennedy.com/index.php/2009/09/24/introduction-to-blackberry-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

