Jump to: navigation, search

Difference between revisions of "Equinox Demos"

 
(56 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==
* Download and install the [http://nokia.com/pcsuite Nokia software].
+
* Ensure you can use Bluetooth to connect to the phone from your PC.
+
* The File Manager tool is useful for transferring 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)
+
<ul>
* well, that was the VM on ''our'' phone :-)
+
<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 mimic the phone's VM on your local machine
+
Demos related to the new launcher work.
** 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. <code>-cp foo.jar com.Foo</code>)
+
* Using the [[Equinox_Phone_Demos#SavaJe | SavaJe]] phone.
* ''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. <code>-Dfoo=bar -cp foo.jar com.Foo</code>)
+
* 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==
* 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.
+
Demos related to the new provisioning story can be found here.
* 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>
+
* 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===
+
==Resource Monitoring Demos==
* <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>.
+
* 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>.
+
* The files will be named <code>&lt;pid&gt;_syserr.txt</code> and <code>&lt;pid&gt;_sysout.txt</code>
+
* Output will always be to this directory, even if your JAR files are on a different drive.
+
  
===Extras===
+
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]].
* j9 -io:host:port
+
* console telnet
+
  
==[http://www.savaje.com SavaJe]==
+
==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
  
We also have a [http://www.savaje.com SavaJe] phone...haven't done anything cool with it yet though.
+
[[Category:Equinox|Demos]]

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