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 "J9"

(Difference between pages)
 
(Configuring J9 into your IDE)
 
Line 1: Line 1:
==What are Execution Environments?==
+
J9 is the Java VM and classlibrary technology from IBM.  It is highly versatile and is used as the basis for many of IBM's product offerings from embedded to enterprise.  IBM has also made the J9 VM available to the Apache Harmony project for use in running their class libraries.
  
==Why should I set them for my plug-in?==
+
IBM offers a number of J9 configurations free for evalutation use.  For Eclipse developers looking to compile or run bundles that require only the Foundation 1.0 classes, this is ideal.
  
==Which Execution Environment should I use?==
+
===Getting J9===
 +
The trial J9 configurations are shipped as part of the WebSphere Everyplace Micro Environment (WEME) 6.1 product.  Follow the steps below to get WEME 6.1.
  
Check out the table of execution environments 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 what your plug-in is committed to. If there is an error with the table, please send a note to the  [mailto:eclipse-dev@eclipse.org eclipse-dev] mailing list and someone will update the table.
+
# go to the [http://www-128.ibm.com/developerworks/websphere/zones/wireless/weme_eval_runtimes.html WEME trials site]
 +
# select any of the links in the right hand column of the WEME 6.1 table (the first table on the page)
 +
# on the Trials and betas page choose the trial that applies to you.  Here you are choosing between Linux and Windows (ensure you select version 6.1)
 +
# verify that you are about to get the right thing and click "Continue"
 +
# at this point you will be ask to login/register.  This process is relatively harmless and in the end worthwhile (you are after all getting this JRE for free)
 +
# be sure to read and then agree to the license
 +
# finally you get to te download page. Here there are several choices so read the headings carefully.  You want "CDC 1.0/Foundation 1.0/Personal Profile1.0 for Windows XP/X86" (or the corresponding one for Linux).  This was the second section at the time of writing.
 +
# Download the Binary or Executable file as you choose (acutally I don't know what a .bin file is...)
 +
# after the download completes, run the installer and follow the instructions etc etc.
 +
# when the download completes there will be a zip file in the install location. That is the J9 configuration you want. Ignore all the other _jvm stuff. That, ironically, is the JRE used to run the installer that "installed" the .zip file.
 +
# unzip the J9 configuration zip file wherever you like
  
==Setting the Execution Environment==
+
===Running J9===
# Use build N20060420-0010 or later.
+
J9 runs like any other Java system with the exception that the executable is called 'j9' instead of 'java'.
# Right click on your plug-in'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).
+
# 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.
+
  
 +
===Configuring J9 into your IDE===
 +
Now that you have J9 on your system, you need to tell the Eclipse IDE about it.  That is you need to ''install the JRE''.  Follow the [http://help.eclipse.org/help31/topic/org.eclipse.jdt.doc.user/tasks/tasks-121.htm instructions in the Eclipse help].  Choose the "Standard VM" type and use the location into which you unzip'd J9 as the JRE home directory. 
  
==Special cases==
+
If you are doing plug-in development, there is no need to set this new JRE definition as the default, PDE will match up your [[Execution Environments | execution environment]] automatically.
  
===Foundation Class Libraries===
+
===Foundation 1.1===
Plug-ins that are Foundation 1.0 should in fact list Foundation 1.0 AND J2SE-1.3 in their execution environmentsThis is because Foundation 1.0 is not a proper subset of 1.3.  Listing them both will in essence say that the intersection of the  
+
You may have noticed Foundation 1.1 downloads availableYou are free to use Foundation 1.1 but as of this writing, the J9 Foundation 1.1 configuration is not readily recognized by the Eclipse IDE. Using this configuration requires that you get and install the J9 Launching plugin from the JDT Debug page.
two is valid for use in that plug-in. The situation is the same for Foundation 1.1 and J2SE-1.4.
+
 
+
[[J9 | Getting J9]] is the easiest way to get a Foundation JRE to run or compile against.
+
 
+
===Compiling Against More Than Is Required===
+
In some cases, a plug-in may require a higher version to compile against, but is able to run perfectly fine against a lower version. For instance, the <tt>org.eclipse.osgi</tt> bundle will use <tt>java.nio.*</tt> classes if available. So it must be compiled against J2SE-1.4 but can run on OSGI/Minimum-1.0.
+
 
+
In these cases the EE required to compile 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===
+
Some bundles may think that they require an EE of J2SE-1.4 but really the only special thing that they require from the 1.4 class libraries are the JAXP XML APIs. So in these cases they can be listed as having an EE of J2SE-1.3 because they still will run ok if another bundle is providing the XML APIs.
+

Revision as of 17:07, 20 April 2006

J9 is the Java VM and classlibrary technology from IBM. It is highly versatile and is used as the basis for many of IBM's product offerings from embedded to enterprise. IBM has also made the J9 VM available to the Apache Harmony project for use in running their class libraries.

IBM offers a number of J9 configurations free for evalutation use. For Eclipse developers looking to compile or run bundles that require only the Foundation 1.0 classes, this is ideal.

Getting J9

The trial J9 configurations are shipped as part of the WebSphere Everyplace Micro Environment (WEME) 6.1 product. Follow the steps below to get WEME 6.1.

  1. go to the WEME trials site
  2. select any of the links in the right hand column of the WEME 6.1 table (the first table on the page)
  3. on the Trials and betas page choose the trial that applies to you. Here you are choosing between Linux and Windows (ensure you select version 6.1)
  4. verify that you are about to get the right thing and click "Continue"
  5. at this point you will be ask to login/register. This process is relatively harmless and in the end worthwhile (you are after all getting this JRE for free)
  6. be sure to read and then agree to the license
  7. finally you get to te download page. Here there are several choices so read the headings carefully. You want "CDC 1.0/Foundation 1.0/Personal Profile1.0 for Windows XP/X86" (or the corresponding one for Linux). This was the second section at the time of writing.
  8. Download the Binary or Executable file as you choose (acutally I don't know what a .bin file is...)
  9. after the download completes, run the installer and follow the instructions etc etc.
  10. when the download completes there will be a zip file in the install location. That is the J9 configuration you want. Ignore all the other _jvm stuff. That, ironically, is the JRE used to run the installer that "installed" the .zip file.
  11. unzip the J9 configuration zip file wherever you like

Running J9

J9 runs like any other Java system with the exception that the executable is called 'j9' instead of 'java'.

Configuring J9 into your IDE

Now that you have J9 on your system, you need to tell the Eclipse IDE about it. That is you need to install the JRE. Follow the instructions in the Eclipse help. Choose the "Standard VM" type and use the location into which you unzip'd J9 as the JRE home directory.

If you are doing plug-in development, there is no need to set this new JRE definition as the default, PDE will match up your execution environment automatically.

Foundation 1.1

You may have noticed Foundation 1.1 downloads available. You are free to use Foundation 1.1 but as of this writing, the J9 Foundation 1.1 configuration is not readily recognized by the Eclipse IDE. Using this configuration requires that you get and install the J9 Launching plugin from the JDT Debug page.

Back to the top