Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between pages "Execution Environments" and "DSDP/MTJ/Phone Meeting 20-Apr-2006"

(Difference between pages)
(Standard Execution Environments)
 
 
Line 1: Line 1:
==What are Execution Environments?==
+
{|border=1 cellspacing=0 cellpadding=4
 +
| Meeting Title:
 +
| '''Mobile Tools for the Java Platform Conference Call'''
 +
|-
 +
| Date & Time:
 +
| Wednesday April 20, 2006 at 9am EST
 +
|-
 +
| US Toll free:
 +
| 866-707-5108
 +
|-
 +
| Int'l or US Toll:
 +
| +1-517-386-9625
 +
|-
 +
| Passcode:
 +
| '''6040654 #'''
 +
|}
 +
== Attendees ==
 +
* Rodrigo Pastrana - IBM
 +
* Petri Virtanen - Nokia
 +
* Craig Setera - EclipseME
 +
* Stanley Gambarin - Apogee
  
Execution environments (EEs) are symbolic representations of JREs.  For example, rather than talking about a specific JRE, with a specific name at a specific location on your disk, you can talk about the J2SE-1.4 execution environment.  The system can then be configured to use a specific JRE to implement that execution environment.
+
== Notes ==
  
Execution environments are relevant both to development (compile) time and runtime.  
+
- Petri presented the status
 +
:- Documentation resources agreed. Work starts after next week and first there will be a review for a table of contents
 +
:- test planning started. At the moment 1 person from Nokia allocated, second is starting mid may. Test case tempate sent for review (Arto and Kevin)
 +
:- We need to get bitmaps for the MTJ. Graphical designer in place and need collection ongoing. We will utilize existing images from Nokia, IBM and EclipseME with modifications as much as possible. Craig verified that it is ok to use EclipseME graphics.
 +
:- Development ongoing in Nokia internal CVS be because due diligence. Development is progressing but bit slowly.
 +
:- We were not able to meet Milestone 1 schedule but it is still possible to keep release 1 deadline (June 2006)
 +
:- Nokia hasn't heard anything from due diligence related to Nokia code
 +
:- Nokia has progsedded in Deployment, SDK management and runtime management areas. And is also started studies related to visual designer.
  
==So what does this mean to me and my bundles?==
+
- IBM hasn't heard anything from IBM part in due diligence
  
Good bundles have minimal dependencies. This allows them to be used in a wider range of situations and results in a smaller overall footprint for applications built of these bundles.  The execution environment needed by your bundle is key in both situations.
+
- Craig has analyzed the EclipseME code for due diligence but we haven't heard any further instructions from them. That will be checked.
  
Consider the different outcomes for some bundle A that requires just Foundation 1.0 and a bundle B that requires J2SE-1.5.  First, A can be used in embedded devices where Foundation 1.0 is quite popular.  Second, an application written entirely of bundles such as A can ship on a Foundation 1.0 JRE.  This results in a 40-50MB disk/transfer footprint savings over J2SE-1.5 JREs!
+
- Rodrigo has check in signing code to Nokia CVS
  
==Wow! Is this hard to setup?==
+
- Craig is doing changes to pre-prosessing in EclipseME and he believes that can be a good base for MTJ. There should be a version during the month.
Not really.  [[OSGi | OSGi]] allows bundles to be marked with the minimum execution environment they require (see the [[#Setting the Execution Environment]]).  Setting this value has two effects.
+
# The compiler attempts to compile your bundle against the JRE associated with the EE you choose.  For example, if you set your EE to be J2SE-1.3, then the compiler will help you stick to that and not let you use APIs which exist in other class library versions. If you choose to increase your EE level, then you are forced to explicitly do so, rather than finding out later that you did it accidentally by referencing new APIs.
+
# The Equinox runtime will refuse to resolve/run your bundle if the current running JRE does not meet the minimum standard you specified.  For example, if you attempt to install bundle B from above (requires J2SE-1.5) on a system running Foundation 1.0, B will not resolve or run.
+
  
==Which Execution Environment should I use?==
+
- MTJ will be presented in JavaONE
  
As discussed above, you should seek to use the smallest EE possible.  Of course, if you actually need the functionality of J2SE-1.5, you should specify that EE.  Remember however that people running on J2SE-1.4, Foundation 1.*, etc. will then not be able to use your bundle.
+
- Stanley ask how to get access to the Nokia CVS. Petri promised to check if that is possible.
 
+
Projects should not leave these choices to chance.  Dependency structures are key parts of an architecture.  For example, the [http://eclipse.org/eclipse Eclipse Project] has explicitly identified EEs for all of their bundles.  These choices are documented in the [http://www.eclipse.org/eclipse/development/eclipse_project_plan_3_2.html#Appendix1 Eclipse 3.2 Plan]. The execution environment listed in the table is based on the needs of the bundle and the expected use scenarios for the bundle.  For example, all of the bundles key to RCP scenarios target only Foundation 1.0.
+
 
+
==Setting the Execution Environment==
+
# Use build N20060420-0010 or later.
+
# Right click on your bundle's <tt>MANIFEST.MF</tt> and select '''Open With... > Plug-in Manifest Editor'''.
+
# Select the '''Overview''' tab.
+
# Note the section in the lower left corner entitled '''Execution Environments'''.
+
# Add your appropriate environment(s) noting the [[#Special cases]] below.
+
# Save the file.
+
# Select the link "update the classpath and compiler compliance settings".
+
# Ensure you have no compile errors in your workspace.
+
# Release your changes to the repository.
+
 
+
==Special cases==
+
 
+
===Foundation class libraries===
+
Bundles that require just Foundation 1.0 should in fact list Foundation 1.0 '''and''' J2SE-1.3 in their execution environments.  This is because Foundation 1.0 is not a proper subset of 1.3 (it includes some additional javax.microedition classes).  Listing them both in essence says that only the intersection of the two EEs is valid for use in the bundle.  The situation is the same for Foundation 1.1 and J2SE-1.4.
+
 
+
===Compiling against more than is required===
+
In some cases, a bundle may optionally use function from newer execution environments if available but fall back to some other behaviour if not.  Such bundles must be compiled against the maximum EE actually used in their code.  For instance, the <tt>org.eclipse.osgi</tt> bundle uses <tt>java.nio.*</tt> classes from J2SE-1.4 if available.  It can however run against the OSGI/Minimum-1.0 EE.  As a result, it must be compiled against J2SE-1.4.
+
 
+
In these cases you must list both the EE required for compilation and the absolute minimum EE for runtime in the '''Execution Environment''' section of the bundle '''Overview'''.  The EE needed for compilation against must appear '''first''' in the list. So for <tt>org.eclipse.osgi</tt>, the list (in order) is ''J2SE-1.4'' then ''OSGI/Minimum-1.0''.
+
 
+
===XML and other optional JRE pieces===
+
You must distinguish between core parts of a JRE and optional parts.  For example, the XML support is not a core part of the class libraries in J2SE-1.4.  There are in fact many ways to get XML support added to almost any execution environment.
+
 
+
While you can gain access to these classes by specifying the related EE, that overly restricts your bundles. The better approach is to ignore this type of class when choosing the minimum EE for your bundle and instead specify Import-Package clauses in the manifest.mf of your bundle.  The IDE and runtime will then find other bundles that export the needed packages and wire the bundles together.
+
 
+
This approach allows, for example, a bundle listing the J2SE-1.3 EE to use XML function as long as there is another bundle that provides (i.e., exports) the XML APIs.
+
 
+
==Managing Execution Environments==
+
For the most part the Eclipse IDE manages the execution environments for you.  You do however have to have the relevant JREs installed on your machine and configured into your IDE. 
+
 
+
Most JREs can be acquired Sun via their [http://java.sun.com main web site] or their [http://java.sun.com/products/archive/index.html handy archive site].  Note that the best source for suitable Foundation 1.* JREs is IBM's J9.  See [[J9 | Getting J9]] for more details.
+
 
+
When you install a new JRE, the IDE analyzes the function it provides and identifies the set of EEs it can support.  The IDE distinguishes between '''exact matches''' for an EE and compatible matches.  You can see all the execution environments and the JREs they match by looking at '''Window > Preferences > Java > Installed JREs > Execution Environments'''.
+
 
+
If you do not have an exact match for an EE that is specified in one of your bundles but do have a compatible match, you get a warning.  Continuing development runs the risk of using API which will not be present at runtime.  If you have neither an exact or compatible match, your bundle's project will fail to compile.
+
 
+
==Standard Execution Environments==
+
The set of execution environments is extensible but the Eclipse IDE includes support for the environments set out in the OSGi R4 specification.  These are summarized in the table below.
+
 
+
{|
+
!width="150"|EE Name
+
!width="500"|Description
+
|-
+
|'''OSGi/Minimum-1.0'''
+
|OSGi Minimum Execution Environment 1.0 - This is a subset of the J2ME Foundation 1.0 class libraries defined by OSGi to be the base for framework implementations.
+
|-
+
|'''OSGi/Minimum-1.1'''
+
|OSGi Minimum Execution Environment 1.1 - This is a subset of the J2ME Foundation class libraries defined by OSGi to be the base for framework implementations.
+
|-
+
|'''CDC-1.0/Foundation-1.0'''
+
|J2ME Foundation 1.0 - With the exception of some MicroEdition IO classes, Foundation 1.0 is a subset of J2SE 1.3.
+
|-
+
|'''CDC-1.1/Foundation-1.1'''
+
|J2ME Foundation 1.1 - With the exception of some MicroEdition IO classes, Foundation 1.1 is a subset of J2SE 1.4.
+
|-
+
|'''JRE-1.1'''
+
|-
+
|'''J2SE-1.2'''
+
|-
+
|'''J2SE-1.3'''
+
|-
+
|'''J2SE-1.4'''
+
|-
+
|'''J2SE-1.5'''
+
|-
+
|'''JavaSE-1.6'''
+
|}
+

Latest revision as of 03:03, 21 April 2006

Meeting Title: Mobile Tools for the Java Platform Conference Call
Date & Time: Wednesday April 20, 2006 at 9am EST
US Toll free: 866-707-5108
Int'l or US Toll: +1-517-386-9625
Passcode: 6040654 #

Attendees

  • Rodrigo Pastrana - IBM
  • Petri Virtanen - Nokia
  • Craig Setera - EclipseME
  • Stanley Gambarin - Apogee

Notes

- Petri presented the status

- Documentation resources agreed. Work starts after next week and first there will be a review for a table of contents
- test planning started. At the moment 1 person from Nokia allocated, second is starting mid may. Test case tempate sent for review (Arto and Kevin)
- We need to get bitmaps for the MTJ. Graphical designer in place and need collection ongoing. We will utilize existing images from Nokia, IBM and EclipseME with modifications as much as possible. Craig verified that it is ok to use EclipseME graphics.
- Development ongoing in Nokia internal CVS be because due diligence. Development is progressing but bit slowly.
- We were not able to meet Milestone 1 schedule but it is still possible to keep release 1 deadline (June 2006)
- Nokia hasn't heard anything from due diligence related to Nokia code
- Nokia has progsedded in Deployment, SDK management and runtime management areas. And is also started studies related to visual designer.

- IBM hasn't heard anything from IBM part in due diligence

- Craig has analyzed the EclipseME code for due diligence but we haven't heard any further instructions from them. That will be checked.

- Rodrigo has check in signing code to Nokia CVS

- Craig is doing changes to pre-prosessing in EclipseME and he believes that can be a good base for MTJ. There should be a version during the month.

- MTJ will be presented in JavaONE

- Stanley ask how to get access to the Nokia CVS. Petri promised to check if that is possible.

Back to the top