Hi;
If you need to find the server name programmatically in WebSphere environment you can use below API
import com.ibm.websphere.runtime.*;
System.out.println("Server Display Name " + com.ibm.websphere.runtime.ServerName.getDisplayName());
System.out.println("Server Full Name " + com.ibm.websphere.runtime.ServerName.getFullName());
System.out.println("Server pid " + com.ibm.websphere.runtime.ServerName.getPid());
System.out.println("Server Server ID " + com.ibm.websphere.runtime.ServerName.getServerId());
System.out.println("Server SMF ID " + com.ibm.websphere.runtime.ServerName.getSMFId());
Subscribe to:
Post Comments (Atom)
1 comment:
Does the use of the above depend on the version of java installed? I am getting the error package com.ibm.websphere.runtime does not exist.
Post a Comment