<?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>George Papayiannis &#187; Java</title>
	<atom:link href="http://www.sematopia.com/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sematopia.com</link>
	<description></description>
	<lastBuildDate>Sat, 01 May 2010 04:50:01 +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>MTJ 0.7M1 released</title>
		<link>http://www.sematopia.com/2006/09/mtj-07m1-released/</link>
		<comments>http://www.sematopia.com/2006/09/mtj-07m1-released/#comments</comments>
		<pubDate>Tue, 19 Sep 2006 18:04:24 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Device UI]]></category>
		<category><![CDATA[J2ME]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=141</guid>
		<description><![CDATA[The Mobile Tools for the Java Platform (MTJ) Eclipse project had its first release this past Friday.  It’s still early and there are many known issues, but it’s worth a try, especially if you have a Nokia phone.  MTJ currently supports (has an extension) for Nokia PC Suite toolkits, so you&#8217;ll have to [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.eclipse.org/dsdp/mtj/">Mobile Tools for the Java Platform</a> (MTJ) Eclipse project had its first release this past Friday.  It’s still early and there are many known issues, but it’s worth a try, especially if you have a Nokia phone.  MTJ currently supports (has an extension) for Nokia PC Suite toolkits, so you&#8217;ll have to go to the Nokia website and download the toolkit for your phone.  You’re also going to need a Java wrapper from the Nokia website, all the <a href="http://download.eclipse.org/dsdp/mtj/downloads/drops/S-0.7M1-200609150951/index.html">information is here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2006/09/mtj-07m1-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>J2ME: MTJ slides, Profiles &amp; Config., Bluetooth Apps, UI, etc..</title>
		<link>http://www.sematopia.com/2006/09/j2me-mtj-slides-profiles-config-bluetooth-apps-etc/</link>
		<comments>http://www.sematopia.com/2006/09/j2me-mtj-slides-profiles-config-bluetooth-apps-etc/#comments</comments>
		<pubDate>Tue, 12 Sep 2006 03:52:00 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Device UI]]></category>
		<category><![CDATA[J2ME]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=129</guid>
		<description><![CDATA[EclipseCon Slides
I came across some great slides today, from a presentation done by Kevin Horowitz at EclipseCon 2006.  Kevin is an IBM employee based out of Boca Raton in Florida.  The slides are called &#8216;Taking it on the road &#8211; Developer tools for J2ME&#8217;
The slides answer six main questions, these are:
What is the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>EclipseCon Slides</strong></p>
<p>I came across some <a href="http://www.eclipsecon.org/2006/Sub.do?id=214">great slides</a> today, from a presentation done by Kevin Horowitz at EclipseCon 2006.  Kevin is an IBM employee based out of Boca Raton in Florida.  The <a href="http://www.eclipsecon.org/2006/Sub.do?id=214">slides</a> are called &#8216;Taking it on the road &#8211; Developer tools for J2ME&#8217;<br />
The slides answer six main questions, these are:</p>
<blockquote><p>What is the J2ME™ environment?<br />
What is the MTJ Project?<br />
What are the plans?<br />
What is out there already?<br />
How is MTJ developing to meet the need?<br />
Where can I get it and how can I help?</p></blockquote>
<p><strong><br />
Profiles and Configurations</strong></p>
<p>I know I talked about this a bit in a <a href="http://www.sematopia.com/?p=127">previous post</a>, but I want to look into this a bit more.  Profiles are at the core of J2ME – they define which types of device are supported and are built on top of configurations.  The main type of configuration for J2ME (along the same lines, cell phones) is CLDC or Connected Limited Device Configuration.  CLDC is comprised the small subset of Java classes needed to run the Java virtual machine.  Built on top of CLDC is MIDP or Mobile Information Device Profile.  There are two widely accepted types of MIDP, version 1.0 and 2.0.  In general they provide an API for LCD GUI development, with 2.0 providing a two dimensional gaming API.</p>
<p>An interesting type of profile, designed for embedded (‘headless’) devices, is IMP or Information Module Profile.  These devices have no LCD display and limited network connectivity (i.e. Vending machine).  IMP is very similar to MIDP, just without the lcdui.* Java package.  As all profiles, these are developed through open JSRs, for more information read them.</p>
<p>A feature rich version of CLDC is CDC or Connected Device Configuration.  CDC includes most of Java SE, essentially all which is not UI related.  The Foundation Profile, Personal Basis Profile and Personal Profile are profiles utilizing a more complete Java SE framework with a subset of AWT support.<br />
<strong><br />
Easiest Way to Upload Apps</strong></p>
<p>Uploading games or applications to your device (phone) via USB cable is most likely disabled.  This is really annoying since the other option is to download the apps and spend money on data transfer rates.  There are ways to make your phone accept apps via USB cable, but these adventures would end up voiding warranty, etc.  I found today a convenient and easy method of uploading apps – Bluetooth.  This method assumes your laptop or computer has Bluetooth capabilities, but if it does, then do the following:</p>
<ul>
<li>Turn Bluetooth on, for your device and laptop.  Find your Bluetooth passwords, most likely if you don’t know them, their 1234.</li>
<li>Set your phone as ‘Discoverable’ by your mobile device.  Most likely your phone will on be visible for 60 seconds.</li>
<li>From your Bluetooth console on your computer, search for available devices.  Once found, right click and ‘Pair’ the device.  This creates a persistent connection between the two Bluetooth devices.  You will be asked for the associated Bluetooth passwords.
</li>
<li>Double click the paired device in your Bluetooth console.  Now, drag and drop the JAR file for your application to the ‘OBEX Object Push’ icon.  Once transferred your phone will ask you to install the application.</li>
</ul>
<p><strong>J2ME UI Development</strong></p>
<p>As shown in a previous post, J2ME MID programs must extend the MIDlet class, which controls the lifecycle of the application.  This lifecycle is simple in nature, with 4 states.  The figure below was taken from <a href="http://www.developer.com/java/j2me/print.php/10934_1561591_1">J2ME Application Development</a> and shows the lifecycle:</p>
<p><img id="image145" src="http://www.sematopia.com/wp-content/uploads/2006/09/03fig01.jpg" alt="03fig01.jpg" /></p>
<p>MIDP user interfaces are divided into 2 parts, the high-level and low-level API.  The low-level API extends the Canvas class and is mainly used to develop games or any UI were you must draw pixels yourself.  A good example of the low-level API in action is the WormGame, packaged in the example application of the Sun Wireless Toolkit.  The high-level API is used to create standard <em>lists</em>, <em>textboxes</em> and <em>forms</em>.  It&#8217;s important to remember when developing with MID, you have no control precisely were widgets will appear on the screen &#8212; this power is given to individual devices (i.e. the device manufacturer).  The <em>form</em> class has numerous children <em>items</em>, which can be attached, these include textfield, stringitem, etc.  The figure below was taken from <a href="http://www.developer.com/java/j2me/print.php/10934_1561591_1">J2ME Application Development</a> and shows structure of MIDP UI Classes.</p>
<p><img id="image144" src="http://www.sematopia.com/wp-content/uploads/2006/09/03fig021.jpg" alt="03fig021.jpg" /></p>
<p>All devices have a <em>Display</em> object, which manages the screen on the given device &#8212; most application will only have 1 instance of a display.  Each new panel to be displayed to the user will be an instance of the Displayable class.  Once this instance is populated with the desired UI widgets, the panel is made visible to the user, by calling the setCurrent method of the Display object.</p>
<p>Below is an example of a method to display a welcome message to a user:</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>private void displayWelcome() {
	try {
		form = new Form(applicationTitle);
		image = Image.createImage(getClass().getResourceAsStream(
				backgroundPath));
		titleImage = new ImageItem("", image, ImageItem.LAYOUT_CENTER, "");
		form.append(new Spacer(10, 10));
		form.append(titleImage);
		form.append(new Spacer(20, 20));
		form.append(welcomeText);
		form.addCommand(exitCmd);
		form.addCommand(openWebURL);
		form.addCommand(openLocalFeed);
		form.setCommandListener(this);
		display.setCurrent(form);
	} catch (Exception e) {
		System.out.println("NewsReader Error: " + e.getMessage());
	}
}</pre>
</div>
<p></code></div>
</div>
<p><strong><br />
General Comments</strong></p>
<p>I’ve been begun playing around with MIDP 2.0 (CLDC 1.0), making some simple and more complicated programs.  I’m using the book J2ME In A Nutshell as a reference when I don’t feel like Googling.  The Sun website has <a href="http://java.sun.com/javame/reference/apis.jsp">JavaDocs</a> for all their standardized JSRs.  The Sun Wireless Toolkit comes with example applications you can use to better understand the J2ME world.  There are three types of XML parsers available, push (SAX), model (DOM) and Pull (Incremental).  XML parsing on resource restricted devices is something that literature says to do with care.  On the same note, most of these articles, etc. were written in 2002/03 and since then, most mobile devices have probably quadrupled in power and memory.  Right now, I’m using <a href="http://www.wilson.co.uk/xml/minml.htm">MinML</a>, a SAX1 supported XML parser designed for devices with 512kB of RAM.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2006/09/j2me-mtj-slides-profiles-config-bluetooth-apps-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>J2ME: First App, RSE and DSDP-MTJ</title>
		<link>http://www.sematopia.com/2006/09/j2me-first-app-rse-and-dsdp-mtj/</link>
		<comments>http://www.sematopia.com/2006/09/j2me-first-app-rse-and-dsdp-mtj/#comments</comments>
		<pubDate>Sat, 09 Sep 2006 05:41:46 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Device UI]]></category>
		<category><![CDATA[J2ME]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=128</guid>
		<description><![CDATA[Continuing on from the day before, I started looking into specifically making an application that would run on my cell phone.  At this point and time, the J2ME runtime and the associated tools seem like the best bet to get started.  It’s not actually called J2ME, but rather the Sun Java Wireless Toolkit [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing on from the day before, I started looking into specifically making an application that would run on my cell phone.  At this point and time, the J2ME runtime and the associated tools seem like the best bet to get started.  It’s not actually called J2ME, but rather the Sun Java Wireless Toolkit 2.5 beta, in any case some really useful development tools are packaged inside to make the mindless setup a lot easier.</p>
<p>To make a simple test application, start the KToolbar.  I had a problem getting this to start, but that was only because KToolbar.bat was pointing to a JVM that didn’t exist anymore (I&#8217;m using the 1.5.0 8 JDK).  Click &#8216;New Project&#8217; and enter a project name and class name – for the sake of argument put TestProj and TestApp.  Click OK, and the settings for the project are automatically loaded in a window.  Check to make sure you are set up for the device you’re using, specifically the MIDP and CLDC setting are correct.</p>
<p>At this point KToolbar has setup the directory structure for your new application, in my case the application is inside of the apps directory of SJWT i.e. C:\WTK25\apps\TestProj.  The IDE I’ll use is <a href="http://eclipse.org">Eclipse</a>, I also installed the plug-in my team here at IBM developed called RSE (Remote Systems Explorer).  It can be downloaded from the Eclipse website within the <a href="http://www.eclipse.org/dsdp/downloads.php">DSDP Project</a>.  RSE allows you to work with remote or local devices.  In this case, we can browse the file system and work with the new directory structure KToolbar made for us.  (You don&#8217;t need to use Eclipse; any editor would be just fine.)</p>
<p>In the /src directory of TestProj create a new file called TestApp.java, the code follows:</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;

public class TestApp extends MIDlet implements CommandListener {
	public void startApp() {
		Display display = Display.getDisplay(this);
		Form mainForm = new Form("TestApp");
		mainForm.append("Your first App");
		Command exitCommand = new Command("Exit", Command.EXIT, 0);
		mainForm.addCommand(exitCommand);
		mainForm.setCommandListener(this);
		display.setCurrent(mainForm);
	}

	public void pauseApp() { }

	public void destroyApp(boolean unconditional) { }

	public void commandAction(Command c, Displayable s) {
		if (c.getCommandType() == Command.EXIT) {
			notifyDestroyed();
		}
	}
}</pre>
</div>
<p></code></div>
</div>
<p>Click here to <a href="http://www.sematopia.com/upload/TestApp.txt">download the code</a>.</p>
<p>This is the equivalent to a Hello World program for a cell phone.  Ok, so let’s review what we have so far.  In the /TestProj directory there is a project.properties file, which holds the standards you are programming with, part of mine is below:</p>
<blockquote><p>
&#8230;.<br />
JSR75: false<br />
MMAPI: true<br />
SATSA-APDU: false<br />
SATSA-CRYPTO: false<br />
SATSA-JCRMI: false<br />
SATSA-PKI: false<br />
WMA0: false<br />
WMA1.1: true<br />
WMA2.0: false<br />
&#8230;.
</p></blockquote>
<p>In the /bin directory there are 2 files.  The first is the manifest file holding a few project specific properties, i.e.:</p>
<blockquote><p>
MIDlet-1: TestProj, TestProj.png, TestApp<br />
MIDlet-Name: TestProj<br />
MIDlet-Vendor: Unknown<br />
MIDlet-Version: 1.0<br />
MicroEdition-Configuration: CLDC-1.0<br />
MicroEdition-Profile: MIDP-2.0
</p></blockquote>
<p>The second file in the /bin directory is the JAD (Java Application Descriptor) file.  As defined on the Motorola Hackers Guide:</p>
<blockquote><p>This file contains a predefined set of attributes (denoted by names that begin with &#8220;MIDlet-&#8221;) that allow application management software to identify, retrieve, and install the MIDlets. All attributes appearing in the JAD file are made available to the MIDlets. The user may define application-specific attributes and add them to the JAD file.</p></blockquote>
<p>With the source file saved, you’re ready to build your application.  From within KToolbar click the Build button and then the Run button.  The source will be compiled and the toolkit will launch the Sun emulator.</p>
<p>On an intersting note, RSE is part of the <a href="http://www.eclipse.org/dsdp/tm/">Target Managment</a> subproject of the <a href="http://www.eclipse.org/dsdp/index.php">Eclipse DSDP</a> (Device Software Development Platform) project.  Another subproject in DSDP is called MTJ or Mobile Tools for the Java Platform.  As it turns out, Nokia is heavily involved in DSDP, specifically MTJ.  Here is a quote from the press release:</p>
<blockquote><p>
Nokia and the Eclipse Foundation today announced that Nokia has joined the Eclipse Foundation as a Strategic Developer and Board member. Nokia will support the work of the Eclipse open source community by contributing software and developers to a proposed new Eclipse project.</p></blockquote>
<p>MTJ was supposed to have had it first release by now, but its been postponed till sometime in September.  I&#8217;m excited to see what their working on, I hope MTJ will support or use RSE in someway.  I look forward to a day were a great open source IDE for resource constrained devices will exist.  Here is a particularly interesting quote from the MTJ project page:</p>
<blockquote><p>
The purpose is to develop both frameworks that can be extended by tool vendors and tools that can be used by 3rd party mobile java application developer.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2006/09/j2me-first-app-rse-and-dsdp-mtj/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>J2ME: Thoughts after first look</title>
		<link>http://www.sematopia.com/2006/09/j2me-thoughts-after-first-look/</link>
		<comments>http://www.sematopia.com/2006/09/j2me-thoughts-after-first-look/#comments</comments>
		<pubDate>Fri, 08 Sep 2006 17:35:43 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Device UI]]></category>
		<category><![CDATA[J2ME]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=127</guid>
		<description><![CDATA[For reasons I don&#8217;t feel like getting into, I&#8217;ve begun a journey to learn as much as possible about developing applications for micro devices.  Before I even get started, let me say I have no prior experience with micro device programming, so a lot of what I say (in coming posts), could very well [...]]]></description>
			<content:encoded><![CDATA[<p>For reasons I don&#8217;t feel like getting into, I&#8217;ve begun a journey to learn as much as possible about developing applications for micro devices.  Before I even get started, let me say I have no prior experience with micro device programming, so a lot of what I say (in coming posts), could very well be wrong.</p>
<p>The cell phone I&#8217;m going to use as a test-bed is my own, a RAZR V3.  Though I&#8217;m using a specific phone, a lot of what I say about micro devices will apply (I think) in the general case.  The first thing needed, is to figure out the Java System settings on your device.  In my case:</p>
<p>CLDC v1.0<br />
MIDP v2.0<br />
Data Space: 1545 K<br />
Heap Size: 800 K</p>
<p>MIDP or Mobile Information Device Profile is a spec written for the development of Java applications on mobile devices, etc.  In the grand design, MIDP sits on top of CLDC or Connected Limited Device Configuration, which is another spec outlining a framework for developing Java ME applications on resource constricted devices.  Both CDLC and MIDP have been developed by the open source community, and as you can probably tell from my phone, different devices support different versions.  The diagram below is from the J2ME Developers Guide for the Motorola V3 Handset.  With that in mind, be sure to get your hands on the Developers Guide for your device.</p>
<p><img id="image126" src="http://www.sematopia.com/wp-content/uploads/2006/09/cell.JPG" alt="cell.JPG" /></p>
<p>In my case, the heap size is 800 K, this defines the amount of memory the JVM (Java Virtual Machine) can use to create objects, story temporary variables, etc.  Developing on cell phone, PDA etc. is a different monster, you need to be conscious of memory size (both disk space and heap size), processing power, screen capabilities and wireless network characteristics.</p>
<p>After I skimmed through the Developers Guide, read up on J2ME, and browsed a couple Wikipedia pages, I set out to find the software I needed to get started.  The first thing I did was install the SDK supplied by Motorola for my phone.  I’m not even sure why they call it an SDK, the entire kit came with 2 applications.  The first was MIDway, which is basically a tool to upload applications to your cell phone.  The second was Motorola Launchpad, which acted as an emulator, to test applications on your computer.  Undoubtedly, these programs will prove useful (eventually), but for now it’s not that helpful in developing applications.  The obvious next install was J2ME, which can be found from the Sun website.</p>
<p>I ended up downloading a couple example applications (with source) from the Motorola website, and after getting a feel for them, wanted to upload these to my phone.  After about 10 minutes of frustration, I realized USB application uploads to a cell phone are restricted to &#8216;Developer phones&#8217;.  You can check if your phone allows USB uploads by looking in the Java Settings, and seeing if a &#8216;Java Link&#8217; option available.  After a little bit of research, I came across the <a href="http://forum2.mobile-review.com//showthread.php?t=16917">Motorola Hackers Bible</a>.  A moderator from <a href="http://www.mobile-review.com/index-en.shtml">Mobile-Review.com</a> I guess got fed up with people asking the same questions, and wrote a masterpiece.  The guide covers a lot of thing, one of which includes transferring applications to your cell phone via USB cable.  Needless to say, I spent the rest of the day reading through this guide…</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2006/09/j2me-thoughts-after-first-look/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing Applications with a Service Oriented Architecture</title>
		<link>http://www.sematopia.com/2006/08/developing-applications-with-a-service-oriented-architecture/</link>
		<comments>http://www.sematopia.com/2006/08/developing-applications-with-a-service-oriented-architecture/#comments</comments>
		<pubDate>Tue, 15 Aug 2006 19:48:24 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[IBM]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=120</guid>
		<description><![CDATA[Update Aug. 22 06: I just learned about the Open SOA (OSOA) project.  It&#8217;s collaboration between the major SOA players to standardize the architecture.  The spec is open, plus they have some nice presentations and white papers.  From the main page:
The Open SOA Collaboration represents an informal alliance of industry leaders that [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update</strong> Aug. 22 06: I just learned about the Open SOA (OSOA) project.  It&#8217;s collaboration between the major SOA players to standardize the architecture.  The spec is open, plus they have some nice presentations and white papers.  From the main page:</p>
<blockquote><p>The Open SOA Collaboration represents an informal alliance of industry leaders that share a common interest: defining a language-neutral programming model that meets the needs of enterprise developers who are developing software that exploits Service Oriented Architecture characteristics and benefits.</p></blockquote>
<p>Service Oriented Architecture or SOA, it’s an acronym I hear a lot of at IBM these days.  I’m not going to attempt and <a href="http://www-128.ibm.com/developerworks/webservices/newto/">explain SOA</a> in a blog post, but before you start reading, think of it as large pieces of a puzzle easily interconnecting.  Tons of companies have embraced it with IBM, Sun and BEA leading the charge.</p>
<p>I’ll be on course next week here at the Toronto Lab, taking &#8216;Developing Applications with a Service Oriented Architecture&#8217;.  I&#8217;m excited about it; I know the high level details of SOA, but a lot of the finer points, including developing the applications, I lack.</p>
<p>The course covers:</p>
<ul>
<li>SOA Overview</li>
<li>IBM SOA Foundation Products Overview</li>
<li>Design SOA Solutions applying principles and patterns</li>
<li>Develop SOA solutions using IBM SOA Foundation</li>
<li>Case study Overview</li>
<li>WebSphere Business Modeler</li>
<li>WebSphere Process Server and WebSphere ESB Overview</li>
<li>Service Component Architecture (SCA)</li>
<li>WebSphere Integration Developer</li>
<li>Process Choreography and Web Services Business Process</li>
<li>Develop and assemble business rules and human tasks</li>
<li>Supporting Services Overview</li>
<li>Developing Mediation Services</li>
<li>Adapters</li>
<li>Deploying to WebSphere Process Server</li>
<li>Managing SOA</li>
<li>SOA Security</li>
<li>IBM SOA Foundation Governance and Processes</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2006/08/developing-applications-with-a-service-oriented-architecture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Bridging the Gap &#8211; Integrating PHP and Java</title>
		<link>http://www.sematopia.com/2006/07/how-to-bridging-the-gap-integrating-php-and-java/</link>
		<comments>http://www.sematopia.com/2006/07/how-to-bridging-the-gap-integrating-php-and-java/#comments</comments>
		<pubDate>Thu, 20 Jul 2006 18:30:10 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP/MySQL]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=114</guid>
		<description><![CDATA[I set out a couple days ago, to see how I could use an existing Java class or Jar within a PHP application.  From what I found there are essentially two ways of going about this.  The first is to integrate Java support directly into PHP using a regular HTTP server, while the [...]]]></description>
			<content:encoded><![CDATA[<p>I set out a couple days ago, to see how I could use an existing Java class or Jar within a PHP application.  From what I found there are essentially two ways of going about this.  The first is to integrate Java support directly into PHP using a regular HTTP server, while the second was to deploy a custom made WAR file into a J2EE container like Tomcat.</p>
<p>One thing for sure in this world: PHP programmers do not want the J2EE world forced upon them.  The solution for me was obvious: integrate Java support directly into PHP.  I had a couple options to tackle this.  I thought about writing my own library, which would use RPC or JNI calls to connect with the existing JAR file, or perhaps use an existing PECL package, but after a little research the best option was to use the open source project PHP/Java Bridge.  The project had received rave reviews and in tests destroyed its competition in performance; by using it own custom protocol to facilitate data transfer.</p>
<p>Installation was also a breeze.  Assuming you have Apache and PHP already installed, copy the appropriate .dll file from the JavaBrdige.war into extension_dir (as defined in php.ini).  For convince rename it to php_java.dll.</p>
<p>for PHP >= 4.3.4 use php-4-java-x86-windows.dll<br />
for PHP >= 5.0.0 use php-5.0-java-x86-windows.dll<br />
for PHP >= 5.1.0 use java-x86-windows.dll</p>
<p>Next, copy JavaBridge.jar from the War file also, into the extension_dir directory.  Then open the php.ini file and add the new extension, i.e. </p>
<p>extension=php_java.dll</p>
<p>That’s it, whatever jar file your going to be using, place it in the lib folder of your php installation.  Restart the server and you should be good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2006/07/how-to-bridging-the-gap-integrating-php-and-java/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>JSF for nonbelievers</title>
		<link>http://www.sematopia.com/2006/06/jsf-for-nonbelievers/</link>
		<comments>http://www.sematopia.com/2006/06/jsf-for-nonbelievers/#comments</comments>
		<pubDate>Mon, 19 Jun 2006 23:58:52 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[IBM]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=102</guid>
		<description><![CDATA[I came across a solid 4 part series today, simply titled &#8220;JSF for nonbelievers&#8221;.  The articles do well to dispel many of the rumours and worries surrounding JSF.  While discussing the architecture and framework, the author solidifies his points through great examples.
Link to the articles
]]></description>
			<content:encoded><![CDATA[<p>I came across a solid 4 part series today, simply titled &#8220;JSF for nonbelievers&#8221;.  The articles do well to dispel many of the rumours and worries surrounding JSF.  While discussing the architecture and framework, the author solidifies his points through great examples.</p>
<p><a href="http://www-128.ibm.com/developerworks/views/java/libraryview.jsp?search_by=nonbelievers:">Link to the articles</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2006/06/jsf-for-nonbelievers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thesis Design Project: Robot Java Code</title>
		<link>http://www.sematopia.com/2006/04/thesis-design-project-robot-java-code/</link>
		<comments>http://www.sematopia.com/2006/04/thesis-design-project-robot-java-code/#comments</comments>
		<pubDate>Tue, 04 Apr 2006 05:19:46 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=69</guid>
		<description><![CDATA[One of my main jobs when working on this project, was to write the code which would control the Robot.
The code is written in Java as our Robot&#8217;s OS was leJOS.
Features of the code include:

A single control loop (as opposed to multiple threads and listeners)
A great &#8217;stay straight&#8217; algorithm which keeps the robot centered in [...]]]></description>
			<content:encoded><![CDATA[<p>One of my main jobs when working on this project, was to write the code which would control the Robot.<br />
The code is written in Java as our Robot&#8217;s OS was <a href="http://lejos.sourceforge.net/">leJOS</a>.</p>
<p>Features of the code include:</p>
<ul>
<li>A single control loop (as opposed to multiple threads and listeners)</li>
<li>A great &#8217;stay straight&#8217; algorithm which keeps the robot centered in the network, through 2 light sensors</li>
<li>Transmission to and from the host component for tasks and logging information</li>
<li>A task driven control structure</li>
</ul>
<p>You can download the <a href="http://www.sematopia.com/upload/final_rcx.java">code here</a>.  To learn more about our final product <a href="http://www.sematopia.com/?p=65">go here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2006/04/thesis-design-project-robot-java-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IBM RSE to go open source soon</title>
		<link>http://www.sematopia.com/2005/12/ibm-rse-to-go-open-source-soon/</link>
		<comments>http://www.sematopia.com/2005/12/ibm-rse-to-go-open-source-soon/#comments</comments>
		<pubDate>Fri, 09 Dec 2005 08:10:21 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[IBM]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=43</guid>
		<description><![CDATA[I'm excited to have the IBM <a href="http://www.developer.ibm.com/isv/rational/remote_system_explorer.html">Remote Systems Explorer (RSE) </a>go open source soon.  I have some cool ideas of how I could use it in the short term.  One would be using it as a possible interface to the next version of the <a href="http://www.sematopia.com/?p=41">extractor robot</a> (for thesis design project).]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m excited to have the IBM <a href="http://www.developer.ibm.com/isv/rational/remote_system_explorer.html">Remote Systems Explorer (RSE)</a> go open source soon.  I have some cool ideas of how I could use it in the short term.  One would be using it as a possible interface to the next version of the <a href="http://www.sematopia.com/?p=41">extractor robot</a> (for thesis design project).</p>
<p>From the <a href="http://www.eclipse.org/dsdp/tm/meetingnotes/DSDP-TM_MeetingNotes_20051107.htm">November 11th meeting notes</a>, it looks like it might be out sometime in December:</p>
<blockquote><p>
RSE Status:</p>
<p>Making some progress but sill some obstacles; looking better, but not quite there yet, hopefully make it till the next meeting (3 weeks)
</p></blockquote>
<p>That would be perfect, I could play with it over the holidays and see if it would work with the RCX brick.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2005/12/ibm-rse-to-go-open-source-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thesis design project:  Proof of Concept 2</title>
		<link>http://www.sematopia.com/2005/11/thesis-design-project-proof-of-concept-2/</link>
		<comments>http://www.sematopia.com/2005/11/thesis-design-project-proof-of-concept-2/#comments</comments>
		<pubDate>Wed, 30 Nov 2005 05:22:06 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[McMaster]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=40</guid>
		<description><![CDATA[Our thesis design project this year is to make an autonomous robot (out of Lego Mindstorms) that will go into a maze and rescue black coloured eggs. This is a year long project and the class is split into teams of 5-6 people (my group has 5).]]></description>
			<content:encoded><![CDATA[<p>Our thesis design project this year is to make an autonomous robot (out of Lego Mindstorms) that will go into a maze and rescue black coloured eggs. This is a year long project and the class is split into teams of 5-6 people (my group has 5).</p>
<p>The robot will be given a text file of the map, before it enters the maze. Once in the maze the goal is simple: Rescue all the victims as fast as possible. The standard Lego Mindstorms software does not apply here. To handle the complex logic and additional constrains we decided to use LeJOS (open source Java OS for the Lego RCX brick).</p>
<p>Tomorrow is the second “proof of concept” and I just spent a good 6 hours today getting our robot to work. All the robot has to do for tomorrow, is go into the maze (in a straight line) detect the egg and rescue it. Seems simple enough… no. First of all, the egg is hallow and thus extremely light. Unless the egg is going to be tied down (by tape or Palestine) the touch sensor will push the egg without even detecting it. I hear using a light sensor would work better; I’ll try that in the future (or a combination!). The next issue is handling all the threads of execution that get spawned from all the listeners that are set.</p>
<p>Ah well, it works now, and is good for tomorrow. This project is going to take lots of work. Eventually the robot will have to make turns, clear blockages, work with a map (and without), save multiple eggs, etc. Good times.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2005/11/thesis-design-project-proof-of-concept-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
