import javahellosv.* ;
import com.ms.com.* ;


public class CJHello implements IDJHello
{
	String m_String = "Java Text String" ;
	final int E_FAIL = 0x80004005 ;

    public void SayHello() 
	{
		System.out.println(m_String);
	}

    public java.lang.String getHelloMessage()
	{
		return m_String ;
	}

    public void putHelloMessage(java.lang.String newString)
	{
		if (newString.startsWith ("BAD"))
		{
			ComFailException MyException = new ComFailException (E_FAIL, 
				"String can't start with the characters 'BAD'") ;
			throw  MyException ;
		}
		else
		{
			m_String = newString ;
		}
	}	
}
