JMX Client -MalformedURLException

Hi

I am writing a JMX client to fetch the MBeans and its attributes. i am able to display weblogic MBeans using the following code snippet. But my requirement is it should run on Unix box. I copied same client onto unix, then i am getting the following error.

<b>MalformedURLExceptionjava.net.MalformedURLException: Unsupported protocol: t3</b>
 

Code Snippet:

try
{
String protocol = 



"t3";
Integer portInteger = Integer.valueOf(portString);
int port = portInteger.intValue();
String jndiroot = "/jndi/";
String mserver = "weblogic.management.mbeanservers.runtime";
JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostname, port,jndiroot + mserver);
Hashtable h = new Hashtable();
h.put(Context.SECURITY_PRINCIPAL, username);
h.put(Context.SECURITY_CREDENTIALS, password);
h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,"weblogic.management.remote");
connector = JMXConnectorFactory.connect(serviceURL, h);
connection = connector.getMBeanServerConnection();
}catch(MalformedURLException me){
System.out.println("MalformedURLException"+me);
}
catch(IOException ie){
System.out.println("IOException"+ie);
}
catch(Exception e){
System.out.println("Exception"+e);
}

Thanks
tripleM

No duplicate posting, please read the rules!
Your previous post is here.