previous next trail start tutorial home feedback openwings.org

The install command

The install command is used to install components into a container manager.  After installation, a component becomes visible in the container manager's list, and the relevant classes are copied to the appropriate location on disk.  Run the install command specifying an installable Jar file to be installed and, if desired, a container manager to install into (if none is specified, the component will be installed into the current container manager).

Syntax: install <file(s) or URL(s)> [<path>]

Instead of an actual file, you can instead specify a URL where the installable Jar file can be found. This is useful for installing components served from remote container managers.

Here's an example of how you'd install a local component.  In this case, we are installing the HelloWorldServiceSync_im.jar component.  This particular Jar file resides in the demos directory, so for convenience we'll navigate to that directory first:

Openwings@root/platform/> lcd ..\demos

  C:\openwings\openwings-1.0\demos

Now we are ready to install the component.  Let's make sure it's there:

Openwings@root/platform/> lls

Directory of C:\openwings\openwings-1.0\demos

HelloWorldProvider_im.jar
HelloWorldPublisher_im.jar
HelloWorldServiceAsync_im.jar
HelloWorldServiceSync_im.jar
HelloWorldSubscriber_im.jar
HelloWorldUser_im.jar
ImageService_im.jar
ImageUI_im.jar
Image_im.jar
Launcher_im.jar
OpenJMSClient_im.jar
OpenJMSServer_im.jar

Now we'll use the install command to install the component. If we don't specify a destination platform, the shell assumes we want to install to the current platform (denoted here by "platform").  In this case, that's exactly what we want to do:

Openwings@root/platform/> install HelloWorldServiceSync_im.jar

  HelloWorldServiceSync_im.jar was installed.

Finally, let's verify that the component was in fact installed.  Use "ls" with or without the -l option to see the list of installed components.

Openwings@root/platform/> ls

...
COMPONENTS:
  HelloWorldServiceSync_im-0.1
  ..
.

...


Let's try a slightly more complex example.  This time, we're going to install a component that's being served over the web.  The destination platform will be a container manager other than the local one.

Openwings@root\> ls

PLATFORMS:
  PCTwo-137.162.11.67
  PCOne-137.162.11.65

In this case, PCOne-137.162.11.65 happens to be the local platform.  The other platform in the list represents an Openwings platform running on another computer on your network.  Also, a component called HelloWorldProvider_im.jar is being served off the webserver of the local platform (via Tomcat).

We want to install the served component to the remote platform (PCTwo).  The served component can be accessed by its URL.  The install command accepts URLs, and it can also accept the name of a remote platform as its final argument.  Here's the command (typed all on one line):

Openwings@root\> install http://PCOne:8880/install/HelloWorldProvider_im-0.1/HelloWorldProvider_im.jar PCTwo-137.162.11.67

http://PCOne:8880/install/HelloWorldProvider_im-0.1/HelloWorldProvider_im.jar was installed.  


Mass Install

Openwings allows you to install multiple components at once. Simply list each the installable jar files after the install command, and Install Service will install each jar file automatically. An example is shown below. Here HelloWorldServiceSync_im and HelloWorldProvider_im are being installed using one install command (typed all on one line):

Openwings@root/platform/> install HelloWorldServiceSync_im.jar HelloWorldProvider_im.jar

For more examples using the install command, see Running The Demos in the Getting Started trail of the tutorial.

Next: The process command

back to top

© Copyright 2002, General Dynamics Decision Systems. All rights reserved.

previous next trail start tutorial home feedback openwings.org