Menu

not able to open browser in solaris 9

sairanjit
2006-11-07
2013-04-30
  • sairanjit

    sairanjit - 2006-11-07

    Hi I am using the Browser Launcher application to launch the browser from my java application. the code is not working on Solaris 9 though Netscape is INSTALLED. 
    Interestingly when I connect through XManager to that Solaris 9 machine its working. But directly in the machine it’s not working. The following stack trace is thrown.
    What could be the reason?

    lbert.exception.BrowserLaunchingInitializingException: one of the supported browsers must be installed: FireFox, Mozilla, Netscape, Konqueror, FireFox, Opera
    at edu.stanford.ejalbert.launching.misc.UnixNetscapeBrowserLaunching.initialize(UnixNetscapeBrowserLaunching.java:92)
    at edu.stanford.ejalbert.BrowserLauncher.initBrowserLauncher(BrowserLauncher.java:80)
    at edu.stanford.ejalbert.BrowserLauncher.<init>(BrowserLauncher.java:35)
    at com.interwoven.modeler.core.modelconfiguration.IWHelpHandler.perform(IWHelpHandler.java:19)
    at ilog.views.diagrammer.application.IlvDiagrammerAction.actionPerformed(Unknown Source)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
    at java.awt.Component.processMouseEvent(Component.java:5488)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
    at java.awt.Component.processEvent(Component.java:5253)
    at java.awt.Container.processEvent(Container.java:1966)
    at java.awt.Component.dispatchEventImpl(Component.java:3955)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
    at java.awt.Container.dispatchEventImpl(Container.java:2010)
    at java.awt.Window.dispatchEventImpl(Window.java:1778)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at ilog.views.util.waitcursor.IlvWaitCursorManager.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

     
    • Jeff Chapman

      Jeff Chapman - 2006-11-07

      It appears the which command is not working when you connect directly to the machine.

      Try the following from the command line when connecting directly and when connecting through XManager: which netscape

      Let me know what the results were.

      Also, have you tried the test application that comes with Browser launcher? You can invoke it from the command line with:
      java -jar BrowserLauncher2-all.jar

      You can use the Copy button to get the log output and paste it into your response regarding the which command.

      Thanks.
      Jeff

       
    • sairanjit

      sairanjit - 2006-11-08

      its working fine now ..sorry for the inconvenience i caused.

       
    • sairanjit

      sairanjit - 2006-11-08

      for handling local files
      try {
                  BrowserLauncher launcher = new BrowserLauncher(null);
                  File helpFile=new File("Help/introduction.html");//this is an example location
                  String urlString;
                  try {
                      //here i converted the relative path of the file to url and passing that url string.
                      urlString = helpFile.toURL().toString();
                      launcher.openURLinBrowser(urlString);
                  } catch (MalformedURLException e) {
                      e.printStackTrace();
                  }
              }
              catch (BrowserLaunchingInitializingException ex) {
                  ex.printStackTrace();
              }
              catch (BrowserLaunchingExecutionException ex) {
                  ex.printStackTrace();
              }
              catch (UnsupportedOperatingSystemException ex) {
                  ex.printStackTrace();
              }
      you can well handle local files like this.

      Regards
      Sai

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.