Skip Navigation Links | |
Exit Print View | |
Oracle GlassFish Server Message Queue 4.5 Developer's Guide for Java Clients |
Starting and Testing a Message Broker
Developing a Client Application
Compiling and Running a Client Application
To Compile and Run the HelloWorldMessage Application
Deploying a Client Application
3. Message Queue Clients: Design and Features
4. Using the Metrics Monitoring API
6. Embedding a Message Queue Broker in a Java Client
The Message Queue files that need to be used in conjunction with Message Queue Java clients can be found in the IMQ_HOME/lib directory. Message Queue Java clients need to be able to use several .jar files found in this directory when these clients are compiled and run.
You need to set the CLASSPATH environment variable when compiling and running a JMS client.
The value of CLASSPATH depends on the following factors:
The platform on which you compile or run
Whether you are compiling or running a JMS application
Whether your application uses the Simple Object Access Protocol (SOAP)
Whether your application uses the SOAP/JMS transformer utilities
The table below lists the .jar files you need to compile and run different kinds of code.
Table 1-1 .jar Files Needed in CLASSPATH
|
A client application must be able to access the file jndi.jar even if the application does not use the Java Naming and Directory Interface (JNDI) directly to look up Message Queue administered objects. This is because JNDI is referenced by the Destination and ConnectionFactory classes.
JNDI .jar files are bundled with JDK 1.4. Thus, if you are using this JDK, you do not have to add jndi.jar to your CLASSPATH setting. However, if you are using an earlier version of the JDK, you must include jndi.jar in your CLASSPATH.
If you are using JNDI to look up Message Queue administered objects, you must also include the following files in your CLASSPATH setting: