Java Reference
In-Depth Information
L ISTING D.2 Continued
* return the correspondednt service instance
public Object lookup(String fullyQName) throws
javax.jnlp.UnavailableServiceException {
Object result = hash.get(fullyQName);
return result;
This service implementation provides only the Internet Explorer browser support on Windows
platforms. It is reported in Listing D.3. It can be invoked to bring up a Web browser window
pointing to a given URL.
L ISTING D.3 The Basic ServiceImpl Class
import javax.jnlp.*;
* Appendix D - Implementation of the corresponding JNLP runtime service
* @author Mauro Marinilli
* @version 1.0
public class BasicServiceImpl implements BasicService{
boolean isBrowserSupported = false;
String browser = “”;
* This class supports only basic Windows platforms
* (MS IE only)
public BasicServiceImpl() {
//detect browser
String os = System.getProperties().getProperty(“”);
if (os.indexOf(“Windows”)!=-1) {
isBrowserSupported = true;
Search WWH ::

Custom Search