    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: An Introduction to Personal Java</title>
        <link>https://members.accu.org/index.php/journals/1142</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>


        <h2>Journal Articles</h2>


<div class="xar-mod-head"><span class="xar-mod-title">CVu Journal Vol 13, #6 - Dec 2001 + Programming Topics</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="https://members.accu.org/index.php/journals/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c76/">Journals</a>

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c77/">CVu</a>

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c117/">136</a>
                    (8)
<br />

                                            <a href="https://members.accu.org/index.php/journals/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c13/">Topics</a>

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c65/">Programming</a>
                    (877)
<br />

                                            <a href="https://members.accu.org/index.php/journals/c117-65/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/journals/c117+65/">All of these categories</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;An Introduction to Personal Java</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 03 December 2001 13:15:48 +00:00 or Mon, 03 December 2001 13:15:48 +00:00</p>
<p><strong>Summary:</strong>&nbsp;</p>
<p><strong>Body:</strong>&nbsp;<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e25" id=
"d0e25"></a>Introduction</h2>
</div>
<p><span class="emphasis"><em>PersonalJava</em></span> is a Java
Application Environment intended for use in &quot;network connectable
devices&quot; [<a href="#JavaSoft">JavaSoft</a>] , in other words
Personal Digital Assistants (PDA's), and Set Top Boxes (STB). As
such it's finding interest from the likes of mobile phone
manufacturers, PDA manufactures, programmers with PDA's, and in
consumer electronics where it has been adopted for the likes of
digital TV (The Multimedia Home Platform (<a href="#MHP">MHP</a>)
is based on <span class="emphasis"><em>PersonalJava</em></span>).
<span class="emphasis"><em>PersonalJava</em></span> is a joint
development between Sun and many device developers in the industry.
As the <span class="emphasis"><em>PersonalJava</em></span> API
continues to be enhanced, this open collaborative process is
supposed to continue.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e47" id="d0e47"></a>The Business
Case</h2>
</div>
<p>Now this is what Java is supposed to be about! As PersonalJava
takes off, we will see Java really delivering on its long promised
Write Once Run Anywhere. This is a technology designed to provide a
common platform, across not just chipset, or operating system but
entire families of devices. As software authors we can now write
our business application, personal organiser, multimedia or game
and have a huge audience, not just the few users that have
installed a Java Virtual Machine. Instead a far larger market
exists and will grow over the coming years as these devices come to
markets, where they will far outnumber the installed personal
computer market.</p>
<p>Imagine a world where your personal organiser is synched with
not just your PC, but also your television, and on each platform
you can run your favourite software, be that your diary, the e-book
you're reading, or the game of space invaders your kids are
playing!</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e54" id="d0e54"></a>So What Is
It?</h2>
</div>
<p>The <span class="emphasis"><em>PersonalJava</em></span>
application programming interface (API) is a collection of
packages, classes and methods defined by a The <span class=
"emphasis"><em>PersonalJava</em></span> specification. It includes
the following Java API's:</p>
<div class="itemizedlist">
<ul type="disc">
<li>
<p><tt class="literal">java.applet</tt></p>
</li>
<li>
<p><tt class="literal">java.awt</tt> - in modified form</p>
</li>
<li>
<p><tt class="literal">java.beans</tt></p>
</li>
<li>
<p><tt class="literal">java.io</tt> - in modified form, and some
classes are optional</p>
</li>
<li>
<p><tt class="literal">java.lang</tt></p>
</li>
<li>
<p><tt class="literal">java.math</tt> - is optional</p>
</li>
<li>
<p><tt class="literal">java.net</tt></p>
</li>
<li>
<p><tt class="literal">java.rmi</tt> - is optional</p>
</li>
<li>
<p><tt class="literal">java.security</tt> - is optional</p>
</li>
<li>
<p><tt class="literal">java.sql</tt> - is optional</p>
</li>
<li>
<p><tt class="literal">java.text</tt></p>
</li>
<li>
<p><tt class="literal">java.util</tt></p>
</li>
</ul>
</div>
<p>All of these are currently based on the JDK 1.1.6 API
specification.</p>
<p>The <span class="emphasis"><em>PersonalJava</em></span>
application environment consists of an implementation of the
<span class="emphasis"><em>PersonalJava</em></span> API with the
<span class="emphasis"><em>PersonalJava</em></span> virtual
machine. This is actually what gets shipped on a device, e.g.
<span class="emphasis"><em>PersonalJava</em></span> applications
can run on any device that has the <span class=
"emphasis"><em>PersonalJava</em></span> application environment
resident on it.</p>
<p>For commercial reasons every effort has been made to reduce the
memory requirements of <span class=
"emphasis"><em>PersonalJava</em></span>, either by making
non-essential bits optional, or rewriting core features to be as
efficient as possible.</p>
<p>Where necessary, features have been added or modified in the
<span class="emphasis"><em>PersonalJava</em></span> from the
original Java to make it more appropriate for the target devices.
For example, the <span class=
"emphasis"><em>PersonalJava</em></span> pays special attention to
the needs of portable devices by providing an optimized version of
the Abstract Window Toolkit (AWT) targeted to small, and perhaps
&quot;odd&quot; shaped displays. Additionally, the <span class=
"emphasis"><em>PersonalJava</em></span> is designed to enable
application support for touch screen, joystick, remote control or
pen control rather than a full keyboard.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e155" id="d0e155"></a>Development
Tools</h2>
</div>
<p>Sun provide several development tools for the PersonalJava
developer:</p>
<div class="itemizedlist">
<ul type="disc">
<li>
<p>JavaCheck - a utility that confirms that your application is a
conforming PersonalJava application.</p>
</li>
<li>
<p>PersonalJava Emulation - An emulation environment, test your
apps on the desktop before deploying them.</p>
</li>
<li>
<p>JDK - The Java Development Kit, the tools any Java developer has
grown used to, and there is no special compiler for PersonalJava,
it's the same one you've always used.</p>
</li>
</ul>
</div>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e170" id="d0e170"></a>Hello
World</h2>
</div>
<p>It's almost obligatory now to begin any tutorial relating to
software with some form of Hello, World program. Well it makes me
feel at home anyway, and gives one confidence that the environment
and development tools are installed and configured correctly. For
this article I'm going to look at <span class=
"emphasis"><em>PersonalJava</em></span> deployed using the Sun VM
on a Compaq iPaq H3630. (If anyone feels like donating another
suitable platform I'll write an article based on that
platform).</p>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e178" id="d0e178"></a>Console
Based</h2>
</div>
<p>It's the simplest program we can start with, the console based
Hello World program:</p>
<pre class="programlisting">
import java.io.*; public class HelloWorld { public static void main(String[] args) { System.out.println(&quot;Hello World&quot;); } }
</pre>
<div class="figure"><a name="d0e185" id="d0e185"></a>
<p class="title c2">Figure 1. </p>
<div class="mediaobject c3">
<table border="0" summary="manufactured viewport for HTML img"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="bottom"><img src=
"/var/uploads/journals/resources/an_introduction_to_personal_java_image_1.png" align=
"left"></td>
</tr>
</table>
</div>
</div>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e190" id="d0e190"></a>Window
Based</h2>
</div>
<p>Moving into more complex territory, and as my PDA doesn't really
support console based applications lets have a look at an AWT based
Hello World:</p>
<pre class="programlisting">
import java.awt.*; import java.awt.event.*; public class Hello extends Frame { static Frame window = new Frame(&quot;Hello&quot;); public static void main(String[] args) { // Create the Hello World label Label hello_label = new Label(&quot;Hello World&quot;); Panel hello_panel = new Panel(); hello_panel.add(hello_label); window.add(BorderLayout.CENTER, hello_panel); // Create an exit button, and associate the click event Button exitButton = new Button(&quot;Exit&quot;); exitButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { System.exit(0); } }); window.add(BorderLayout.SOUTH, exitButton); // prepare to open fullscreen Dimension screen_dimension = Toolkit.getDefaultToolkit().getScreenSize(); window.setSize(screen_dimension.width, screen_dimension.height); // show the window window.show(); } }
</pre>
<p>Which gives us the following:</p>
<div class="figure"><a name="d0e199" id="d0e199"></a>
<p class="title c2">Figure 2. </p>
<div class="mediaobject c3">
<table border="0" summary="manufactured viewport for HTML img"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top"><img src=
"/var/uploads/journals/resources/an_introduction_to_personal_java_image_2.png" align=
"left"></td>
</tr>
</table>
</div>
</div>
<p>What is really great about this is that unlike the development
I've been looking at using Microsoft Embedded Visual C++, where I
have to recompile for each chipset, let alone operating system,
this is truly portable code, and the same programs will run on my
desktop!</p>
</div>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e206" id="d0e206"></a>Where to Find
Out More</h2>
</div>
<p>The <span class="emphasis"><em>PersonalJava</em></span> <a href=
"#homepage">homepage</a> , includes links to download the Personal
Java specification, Windows CE runtime, and the Personal Java
emulation environment. There are several other 3rd party VM's and a
number of other companies are developing <span class=
"emphasis"><em>PersonalJava</em></span> systems for their market
places.</p>
</div>
<div class="bibliography">
<div class="titlepage">
<h2><a name="d0e220" id="d0e220"></a>References</h2>
</div>
<div class="bibliomixed"><a name="JavaSoft" id="JavaSoft"></a>
<p class="bibliomixed">[JavaSoft] <span class="bibliomisc"><a href=
"http://www.javasoft.com" target=
"_top">http://www.javasoft.com</a></span></p>
</div>
<div class="bibliomixed"><a name="MHP" id="MHP"></a>
<p class="bibliomixed">[MHP] <span class="bibliomisc"><a href=
"http://www.mhp.org" target=
"_top">http://www.mhp.org</a></span></p>
</div>
<div class="bibliomixed"><a name="homepage" id="homepage"></a>
<p class="bibliomixed">[homepage] <span class="citetitle"><i class=
"citetitle">PersonalJava</i></span> homepage - <span class=
"bibliomisc"><a href="http://java.sun.com/products/personaljava/"
target=
"_top">http://java.sun.com/products/personaljava/</a></span></p>
</div>
</div>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
