package com.ibm.jvm.util.html does not exist

Posted on 2007-10-14
Medium Priority
Last Modified: 2013-11-23
i am trying to compile this:

import java.util.Hashtable;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Queue;
import javax.jms.QueueConnection;
import javax.jms.QueueConnectionFactory;
import javax.jms.QueueReceiver;
import javax.jms.QueueSender;
import javax.jms.QueueSession;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

import com.ibm.jvm.util.html.Text;

public class QueueReceiveSynchronous
      public static void main(String[] args)
                  // create a JNDI context
                  Hashtable properties = new Hashtable();
                  Context context = new InitialContext(properties);
                  // retrieve queue connection factory
                  QueueConnectionFactory queueConnectionFactory =
                  // create a queue connection
                  QueueConnection queueConnection = queueConnectionFactory.createQueueConnection();
                  // start delivery of incoming messages
                  // create a queue session
                  // set transactions to false and set auto acknowledgement of receipt of messages
                  QueueSession queueSession = queueConnection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
                  // retrieve queue
                  Queue queue = (Queue)context.lookup("queue1");
                  // create a queue receiver and associate to the retrieved queue
                  QueueReceiver queueReceiver = queueSession.createReceiver(queue);
                  // receive message using the synchronous receive method
                  Message message = queueReceiver.receive();
                  String messageText = null;
                  if (message instanceof TextMessage)
                        messageText = ((TextMessage)message).getText();
                  // clean up
            catch (NamingException e)
            catch (JMSException e)

C:\Projects\Leader\prototype\jms\openjms2>javac *.java
QueueReceiveSynchronous.java:17: package com.ibm.jvm.util.html does not exist
import com.ibm.jvm.util.html.Text;

does anyone know where to get this package?
Question by:mmingfeilam
  • 2

Expert Comment

ID: 20086388
Are you using IBM's JVM to compile this code?


Author Comment

ID: 20087208
no, maybe that's why it's doesn't have that package?

Accepted Solution

msmolyak earned 750 total points
ID: 20087553
If you are developing a client running against IBM server you may have to use their JVM. It comes with their development tools such as RAD. You can try to obtain it separately from http://www.ibm.com/developerworks/java/jdk/.

Before doing this, though, try to understand why you need this package. Your code looks like standard JMS code for receiving messages. Why does it need an IBM-specific class?


Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Starting up a Project
Suggested Courses
Course of the Month14 days, 15 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question