apache > ws.apache

## Apache Muse - Application Deployment for OSGi on J2ME

The J2ME Connected Device Configuration with Foundation Profile 1.1 (CDC/FP 1.1) is required to run Muse applications. Please make sure that you have installed the right version of the J2ME JDK and added the endorsed libraries as described in the reference manual.

Once you have installed the J2ME JRE on the mobile device that will host your Muse-based application, you should take the following steps to make sure the application deploys correctly:

- Ensure ActiveSync is running and cradle the device. Select Tools > Explore Device and ensure that your J2ME JRE installation looks similar to this:
  It's okay if the name of your $JAVA_HOME directory is different from /Program Files/J9/FOUN11, but the rest of the directory tree should be the same and muse-logging-2.2.0.jar should be present under $JAVA_HOME/lib/endorsed.
- Run ant from the project directory that was created by WSDL2Java. Copy the contents of your project directory into a new directory on your mobile device (our example uses the name /muse2).
  Note
  Do not use spaces in your application's directory name, or Equinox will fail to start.
- Create a shortcut file named run-muse.lnk for the following command line:

  > `

  >     255#"\Program Files\J9\FOUN11\bin\j9.exe" -jcl:foun11 -cp \muse2\org.eclipse.osgi_3.2.0.v20060601.jar org.eclipse.core.runtime.adaptor.EclipseStarter -console -clean

  > `

  This command will start the J2ME JRE (J9) as well as the Eclipse Equinox OSGi runtime. Be sure to change the directory names in bold to match the ones on your system.

- Wait for Equinox to complete the initialization process and then run the ss command, which will output the state of each OSGi bundle. All of the bundles should be listed as ACTIVE - if this is not the case, check the log files for error messages.

- You can now go to the next step and try to communicate with the endpoint from a test client. Be sure to use the device's IP address (not localhost) when creating EPRs that target the endpoint.

< Back Next >