Jump to: navigation, search

Difference between revisions of "Equinox Demos"

 
(52 intermediate revisions by 5 users not shown)
Line 1: Line 1:
==[http://www.nokiausa.com/phones/9300 Nokia 9300 Communicator]==
+
==Application Model==
 +
The [[Equinox Application Model Demo]] shows how to create and run multiple OSGi MEG applications.
  
===Local Machine Setup===
+
==API Tooling==
The first thing you need to do is ensure that your machine can talk to your phone. We used Bluetooth for our communications. We also downloaded and installed the  [http://nokia.com/pcsuite Nokia PC Suite] so we could use the File Manager tool for transfering files from your local machine to the phone.
+
  
===Java on the phone===
+
The [[API Comparison demo]] uses comparison of Eclipse SDK 3.1 and 3.2 to show how to generate reports on:
The Java VM on the phone is J9 Personal Profile 1.0 (ppro10) Well, that was the VM on ''our'' phone. :-)
+
<ul>
 +
<li>breaking API changes</li>
 +
<li>binary backward-compatible changes</li>
 +
<li>version number checks</li>
 +
</ul>
  
===Java on your local machine===
+
==Launcher Demos==
To make things easier, we set up the demos on our local machine, ensured they were working ok, and then transfered them to the phone. So the first thing we had to do was ensure that we had the right VM set up locally.
+
Demos related to the new launcher work.
* First you need to download the [[J9 | Foundation 1.0/Personal Profile 1.0 VM]].
+
* Add the VM as an Installed JRE (<code>Window -> Preferences -> Java -> Installed JREs</code>).
+
* Add the 2 extra libraries as external JARs (<code>ppro-ui.jar</code>, <code>ppro-extras.jar</code>).
+
* Add the following default VM arg: <code>-jcl:ppro10</code>.
+
  
===Running a Java application on the phone===
+
==[[Equinox Phone Demos | Phone Demos]]==
* The file-system can be referenced like Windows with <code>C:</code> and <code>D:</code> (the <code>D:</code> drive is the memory card).
+
Click [[Equinox Phone Demos | here]] to check out some of the demos that the Equinox team has done for some cool phones.  
* The J9 VM is associated with the <code>.j9</code> file-type. You create a <code>.j9</code> file with all the command-line arguments for your application and then when you click on it in the file manager it will run J9.  
+
* Setting up the [[Equinox_Phone_Demos#Nokia_9300_Communicator | Nokia 9300 Communicator]].
* The file contains everything that you want on the command line except the reference to the VM executable. e.g.
+
* Using the [[Equinox_Phone_Demos#SavaJe | SavaJe]] phone.
<pre>-cp foo.jar com.Foo</pre>
+
* ''Note:'' any arguments '''after''' the class name on the commandline are passed to the class as arguments to the application and are '''not''' interpreted by the VM. Therefore if you are trying to set system properties, it should be done early in the command-line. e.g.
+
<pre>-Dfoo=bar -cp foo.jar com.Foo</pre>
+
* Use the file manager on the phone to select the <code>.j9</code>. Opening it will launch the Java application.
+
  
===Running an Eclipse Application on the phone===
+
==Provisioning Demos==
 +
Demos related to the new provisioning story can be found here.
  
====XML====
+
==Resource Monitoring Demos==
Since Eclipse uses an XML parser to read the registry and other files, you will need to get bundles that provides the XML Parser APIs. A good candidate for this are 2 bundles (<code>org.eclipse.ercp.xml</code>, <code>org.eclipse.ercp.xmlParserAPIs</code>) which are included as part of the [http://eclipse.org/ercp eRCP] project. These two bundles are created as framework extensions so you need to tell OSGi about them by setting a system property:
+
<pre>osgi.framework.extensions=org.eclipse.ercp.xmlParserAPIs,org.eclipse.ercp.xml</pre>
+
  
====Personal Profile EE====
+
Check out the [http://www.eclipse.org/equinox/incubator/monitoring/index.php Equinox Incubator] for more information on our Resource Monitoring code. Here is a link to our [[Equinox Resource Monitoring Demo | EclipseCon 2007 demo script]].
Now when you try and run, you will likely get an exception saying that OSGi couldn't match the required Execution Environment for some of the bundles. They are looking for the Founation 1.0 EE but the current VM doesn't match this. So we need to create a new profile which looks like this:  
+
<pre>
+
org.osgi.framework.system.packages = \
+
javax.microedition.io
+
org.osgi.framework.bootdelegation = \
+
javax.microedition.io
+
org.osgi.framework.executionenvironment = \
+
OSGi/Minimum-1.0,\
+
OSGi/Minimum-1.1,\
+
CDC-1.0/Foundation-1.0,\
+
CDC-1.0/PersonalProfile-1.0,\
+
CDC-1.1/PersonalProfile-1.1
+
osgi.java.profile.name = CDC-1.0/PersonalProfile-1.0
+
</pre>
+
Next we need to set a system property for the new profile which contains a file URL to the location of the file:
+
<pre>osgi.java.profile=file:d:/temp/ppro.profile</pre>
+
  
===Writing to the Console===
+
==Server-Side OSGi==
* <code>C:/logs/j9vm</code> - You ''must'' have this directory created or your Java application will hang when it tries to write something to <code>System.out</code> or <code>System.err</code>.
+
* JSPs - there are some demos that come with Tomcat and Struts
* When you run your Java application 2 files will be created in this directory, one for <code>System.err</code> and one for <code>System.out</code>.
+
* Embedded in app server
* The files will be named <code>&lt;pid&gt;_syserr.txt</code> and <code>&lt;pid&gt;_sysout.txt</code>
+
* show the dev scenario - easy to use
* Output will always be to this directory, even if your JAR files are on a different drive.
+
  
===Extras===
+
[[Category:Equinox|Demos]]
* j9 -io:host:port
+
* console telnet
+
 
+
==[http://www.savaje.com SavaJe]==
+
 
+
We also have a [http://www.savaje.com SavaJe] phone...haven't done anything cool with it yet though.
+

Latest revision as of 11:16, 22 March 2007

Application Model

The Equinox Application Model Demo shows how to create and run multiple OSGi MEG applications.

API Tooling

The API Comparison demo uses comparison of Eclipse SDK 3.1 and 3.2 to show how to generate reports on:

  • breaking API changes
  • binary backward-compatible changes
  • version number checks

Launcher Demos

Demos related to the new launcher work.

Phone Demos

Click here to check out some of the demos that the Equinox team has done for some cool phones.

Provisioning Demos

Demos related to the new provisioning story can be found here.

Resource Monitoring Demos

Check out the Equinox Incubator for more information on our Resource Monitoring code. Here is a link to our EclipseCon 2007 demo script.

Server-Side OSGi

  • JSPs - there are some demos that come with Tomcat and Struts
  • Embedded in app server
  • show the dev scenario - easy to use