How to open IE window for .html user manual?

how to open an IE window for a .html user manual?
I'm creating a user manual in .html format, and I want to open that file in an IE window when a user click on the "Help" menu (JMenuItem - using ActionPerformed event).
Is it possible to do that in java?
What class shall I use?

Call the following class from ur ActionPerformed();
     import java.io.IOException;
public class BrowserControl {
   private static final String WIN_ID = "Windows";
   private static final String WIN_PATH = "rundll32";
   private static final String WIN_FLAG = "url.dll,FileProtocolHandler";
   private static final String UNIX_PATH = "netscape";
   private static final String UNIX_FLAG = "-remote openURL";
  public static void displayURL(String url) {
    boolean windows = isWindowsPlatform();
    String cmd = null;
    try {
      if (windows) {
        cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
        Process p = Runtime.getRuntime().exec(cmd);
      else {
        cmd = UNIX_PATH + " " + UNIX_FLAG + "(" + url + ")";
        Process p = Runtime.getRuntime().exec(cmd);
        try {
          int exitCode = p.waitFor();
          if (exitCode != 0)  {
            cmd = UNIX_PATH + " " + url;
            p = Runtime.getRuntime().exec(cmd);
        catch(InterruptedException x)  {
          System.err.println("Error bringing up browser, cmd='"+cmd+"'");
          System.err.println("Caught: " + x);
    catch(IOException x) {
      // couldn't exec browser
      System.err.println("Could not invoke browser, command=" + cmd);
      System.err.println("Caught: " + x);
  public static boolean isWindowsPlatform()  {
    String os = System.getProperty("os.name");
    if ( os != null && os.startsWith(WIN_ID))
      return true;
    else
      return false;
}

Similar Messages

  • How to open multiple sessions for one user?

    Sorry for the silly question but I couldn't find it googling or searching through this forum, so I started wondering whether it's possible in SQL Developer to open multiple sessions for one user. I'm fairly new to SQL Developer and databases in general.
    When I open SQL Developer and connect to a schema, a worksheet opens named MYSCHEMA. If I disconnect then connect, another worksheet opens, named MYSCHEMA~1. I assumed these were different sessions, but if I enter into one worksheet:
    select col1 from my_table where row_id = 1
    -- shows result is 1
    update my_table set col1 = 0 where row_id = 1
    select col1 from my_table where row_id = 1
    -- shows result is 0and then enter into the second worksheet:
    select col1 from my_table where row_id = 1
    -- shows result is 0I would have expected the second worksheet to report 1 because the first worksheet did not issue a COMMIT. Thus, I'd guess both worksheets are the same session? Is that right? If so, how do I have two sessions open simultaneously (opened by same user)?
    I'm trying to implement the code at the bottom of this post, for which testing requires at least two sessions:
    Re: Help with Procedure
    Edited by: tem on Apr 18, 2012 6:44 AM

    Thanks Jim,
    Ctrl-Shift-N doesn't do anything for me. I'm on a mac -- by experimenting it looks like command-N does what you're looking for. This appears to be the same as left-clicking on the "New" icon in the top left corner of SQL Developer, or selecting from the pull-down menu, File > New.
    This opens "Create a New" window that appears to be a wizard. What would I select at this point? Options are: Database Connection, Table, View, Package, ...
    I don't see an option for "Worksheet".
    UPDATE:
    OK, I found that if I select "SQL File", a worksheet becomes available. Perhaps this is what you intended. However, when I issue the command
    select col1 from my_table where row_id = 1;it still returns 0 instead of 1. Hmm, maybe my initial assumption was wrong -- if this is a second (e.g. different) session, should I expect the changes made in the first session in SQL Developer (the UPDATE command) WITHOUT a commit, to be observed in this second session? I thought that changes made in one session were not viewable in a different session until these changes are committed in the first session? If so, how to show this in SQL Developer? I must be missing something basic here.
    Or, is SQL Developer issuing some sort of "auto-commit" without my knowledge?
    Edited by: tem on Apr 18, 2012 8:00 AM

  • How to automatically open browser window for getting user id & password

    i have created a jsp page, that page cannot be open by anyone anyway, it should be only visible to me only.
    how do i achieve this.
    my requirement is that whenever any one request for that jsp page, browser should automatically open one window and ask for user id & password, if it is right then the page should be displayed else error should be shown.

    Adding the following to web.xml will define security constraints for all resources under the /admin directory, also only a user in the manager role will have access to these resources.
    For tomcat you can look at the conf/tomcat-users.xml file for setting up users and roles
         <security-constraint>
              <web-resource-collection>
                   <web-resource-name>Secure Pages</web-resource-name>
                   <description></description>
                   <url-pattern>/admin/*</url-pattern>
                   <http-method>GET</http-method>
                   <http-method>POST</http-method>
              </web-resource-collection>
              <auth-constraint>
                   <description></description>
                   <role-name>manager</role-name>
              </auth-constraint>
         </security-constraint>
         <security-role>
              <description></description>
              <role-name>manager</role-name>
         </security-role>

  • Runtime.exec() - how to open new window for new program?

    Hi,
    I have searched through the forums but haven't found an answer to this one yet. I am using runtime.exec() to start up a new java program. At first I thought it wasn't running properly but, after checking task manager, I have discovered that the new program I open runs, it is just completely invisible to me. I am wondering how I can get the new program to run in a command window or something where I can monitor it.
    Thank you for your help,
    Drew

    Thank you all. After trying to figure out why the start command wouldn't work in the runtime.exec() call(not an executable - I am a dolt), I tried putting it in a batch file and it worked perfectly. Thanks for your help,
    Drew

  • How to open new window and generate oracle report from apex

    Hi,
    I had created an application that generates PDF files using Oracle Reports, following this Guide.
    http://www.oracle.com/technology/products/database/application_express/howtos/howto_integrate_oracle_reports.html
    And I followed 'Advanced Technique', so that users can't generate PDF file by changing URL and parameters. This is done for security reasons.
    But in this tutorial, when 'Go' button is pressed, the PDF file is displayed on the same window of apex application. If so, user might close the window by mistake. In order to avoid this, another window have to be opened.
    So, I put this code in the BRANCH - URL Target. (Note that this is not in Optional URL Redirect in the button property, but the branch which is called by the button.)
    javascript:popupURL('&REPORTS_URL.quotation&P2100_REP_JOB_ID.')
    But if the button is pressed, I get this error.
    ERR-1777: Page 2100 provided no page to branch to. Please report this error to your application administrator.
    Restart Application
    If I put the code 'javascritpt ....' in the Optional URL Redirect, another window opens successfully, but the Process to generate report job is not executed.
    Does anyone know how to open new window from the Branch in this case?

    G'day Shohei,
    Try putting your javascript into your plsql process using the htp.p(); procedure.
    For example, something along these lines should do it:
    BEGIN
    -- Your other process code goes here...
    htp.p('<script type="javascript/text">');
    htp.p('popupURL("&REPORTS_URL.quotation&P2100_REP_JOB_ID.")');
    htp.p('</script>');
    END;
    What happens is the javascript is browser based whereas your plsql process is server based and so if you put the javascript into your button item Optional URL Redirect it is executed prior to getting to the page plsql process and therefore it will never execute the process. When you have it in your branch which normally follows the processes, control has been handed to the server and the javascript cannot be executed and so your page throws the error "Page 2100 provided no page to branch to"... By "seeding" the plsql process with the embedded javascript in the htp.p() procedure you can achieve the desired result. You could also have it as a separate process also as long as it is sequenced correctly to follow your other process.
    HTH
    Cheers,
    Mike

  • How to open a window in full screen mode using lf_fpm_navigation?

    Hi Guys
    For the following applications
    ESS Application: HAP_START_PAGE_POWL_UI_ESS
    MSS Application: HAP_START_PAGE_POWL_UI_MSS
    When the user clicks on the appraisal document name, a seperate window(not full screen) is generated to display the Appraisal docuemnt.
    The code is as follows:
    COMP: HAP_START_PAGE_POWL_UI
    Object : COMPONENTCONTROLLER
    Method: FOLLOWUP_POWL
    Generate the URL to be called.
        CALL METHOD cl_wd_utilities=>construct_wd_url
          EXPORTING
            application_name = 'HAP_MAIN_DOCUMENT'
            in_parameters    = lt_parameters
          IMPORTING
            out_local_url    = l_url.
        wd_this->url = l_url.
        wd_this->display_document( ).
    In Method: DISPLAY_DOCUMENT
    lv_alias = 'EMPLOYEE_DOCUMENT_UI_OBN'.
    use FPM navigation
        ls_nav_key-key1 = 'HAP'.
        ls_nav_key-key2 = 'HAP_GENERIC_UI'.
        lr_fpm_navigation ?= lr_fpm->get_navigation( is_key = ls_nav_key iv_instance_sharing = abap_false ).
        CALL METHOD lr_fpm_navigation->get_key_from_alias
          EXPORTING
            iv_alias = lv_alias
          RECEIVING
            rv_key   = lv_key.
        lr_fpm_navigation->modify_parameters(
             EXPORTING
               id_target_key            = lv_key
               it_application_parameter = lt_appl_param
               it_business_parameter    = lt_business_param    ).
        lr_fpm_navigation->navigate( lv_key ).
    Any idea how to open this window in full screen?
    Highly appreciate your help.
    Thank and Regards
    Pramod

    Hi Pramod,
    This FPM navigation is achieved using settings made in Launchapd Customizing ( LPD_CUST ).
    a) Execute Tran LPD_CUST
    b) Go to Role HAP - Double Click to open it.
    c) Open the second folder on the LHS menu - there you will find 2 entries
    d) Click on second entry - in the entry setting you can see that it is configured for WD Application  - HAP_MAIN_DOCUMENT
    e) Click on button Show Advanced Parameters
    f) There you will find a input box named as Window Features - here you can specify window features like
    height=700,width=1100,position=center,menu=no,status=no,location=no,menubar=no,status=no,toolbar=no
    save the settings come out and test ur app again.
    change the height and width and other features as per ur req.
    Regards
    Manas Dua

  • Cannot open application Page for anonymous user

    Hello,
    I have a share point site that allow for anonymous .
    I create an application page that inherits from "UnsecuredLayoutsPageBase".
    When I open the page as anonymous user , the result is 
             "The web page cannot be found"
    When I lo-gin to the site , the page opened successfully.
           So how can Open application Page for anonymous ?
      Thanks
    ASk

    Have you overridden the following property in the page?
    protected override bool AllowAnonymousAccess { get { return true; } }
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • How to find how many cursors are opend for application user

    Hi all,
    how to find out how many cursors are opend for application user and how many are opend for database user
    Regards,
    RM

    Oracle does not know the difference between an "application user" and a "database user".
    Oracle deals with a session. This session services a client. The client can be a J2EE application. It can be a Delphi client. It can be a SQL*Plus command line tool. It can be TOAD. Etc.
    Oracle does not care who/what/where the client is when dealing with cursors and SQL. It deals with the session that services that client.
    How many cursors does a session have opened?
    Refer to V$OPEN_CUSOR in [url http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2008.htm#sthref3807]Oracle® Database Reference.
    A select count on V$OPEN_CURSOR for a specific SID (Session ID) will return the number of open cursor handles in that session.

  • How do I load windows for mac

    How do I load windows for mac I have DVD software

    You can install Windows on a Mac with Boot Camp or a virtual machine. If you need maximum performance, use Boot Camp.
    If you want to use Boot Camp, first check that the Windows version you want to install is compatible with your iMac > http://support.apple.com/kb/HT5634 Then, open Boot Camp Assistant, in /Applications/Utilities, and follow the steps to install Windows. Check > http://manuals.info.apple.com/en_US/boot_camp_install-setup_10.8.pdf
    If you want to use the virtual machine, you have to install an application like Parallels, VMware Fusion or VirtualBox, create a virtual machine and install Windows there

  • How much is Creative Cloud for Government Users?

    We are looking to upgrade, but are wondering how much is Creative Cloud for government users? Is it better to buy into Creative Cloud or is it better to buy single application licenses? We would like to purchase licenses that are cost efficient.

    Cloud Plans https://creative.adobe.com/plans
    -and subscription terms http://www.adobe.com/misc/subscription_terms.html
    Government accounts https://forums.adobe.com/thread/1483694

  • TS3276 Mail has started sending duplicates of a message, especially group messages.  It also opens 2 windows for writing a new email.  Help.

    Mail has started sending duplicates of a message, especially group messages.  It also opens 2 windows for writing a new email.  Help. How do I fix this?

    Unfortunately there isn't official commercial support for Mozilla Thunderbird from Mozilla Corp.. I believe some contributors here ([http://mozilla.magicfab.ca myself included]) do offer such support, though.
    ''Before doing anything else, please do exit Thunderbird completely and [https://support.mozilla.org/en-US/kb/profiles-tb#w_backing-up-a-profile backup the profile folder] - it contains all your email, settings, filters, etc.''
    Regarding your issue, it looks like the mail folder information may be corrupt. In the left pane, in the folder list, right-click on the Sent folder and select '''Properties'''. Choose "'''Rebuild Index'''" or "'''Repair Folder'''" - do you even have that option? Once done, exit TB completely and restart it.
    Updating to a newer version will help anyone help you, if only because some of the documentation for older Thunderbird versions is a bit harder to find and testing to try & reproduce your problem will be harder. Don't do this just yet, though :)
    After this issue has been addressed I would suggest considering using IMAP if your provider allows you to, and of course archiving your email to Local Folders and doing regular backups of your profile.
    If you want to arrange commercial support, contact me via the link I provided above and we can discuss rapidly. Otherwise I am fine continuing here, however I can only reply as time permits. I am in Montreal (so, EST time zone).

  • Open popup window and redirect user to home page in sandboxed solution

    i've created a sandboxed solution visual webpart and it has submit button so when user fills the information in the text boxes availble in webpart and clicks submit button so I want to open popup button containg success message and ok button so when user
    clicks ok button in popup window i want user to be redirected to the home page of the site.
    i tried to open popup and showed success message by below code
     string gotohomepage = "http://sp2013:1111/Pages/home.aspx";
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('Your Record has been submitted successfully,you will be redirected to home Page shortly');location.href =
    '" + gotohomepage + "';", true);
    but it's not opening popup window can anyone help how do i open popup window and redirect user to home page in sandboxed solution

    Page class and script manager are not supported in sandbox solution
    You can create model popup to achieve this
    below are the reference links
    http://blogs.msdn.com/b/chaks/archive/2011/09/14/modal-dialog-box-in-sharepoint-sandbox.aspx
    http://social.msdn.microsoft.com/Forums/en-US/9427db4d-60f2-4b2a-8db6-b50d01ac4f23/how-to-create-modal-popup-using-sandboxed-solution

  • We have two Apple ID's but share the same computer....that runs Itunes...How do i setup Icloud for ea. user ID?

    We have two Apple ID's but share the same computer....that runs Itunes...How do i setup Icloud for ea. user ID?

    You can't merge Apple IDs.  What you could do is set up your phone to use the same iCloud accout you are using on your Mac.  To do this, go to Settings>iCloud and turn all synced data (Contacts, Calendars, etc.) to Off.  When prompted, choose to keep the data on the phone.  When everything is off, scroll to the bottom and tap Delete Account.  Now add the iCloud account you set up on your Mac (with the same Apple ID) and turn syncing back on for Calendars, Contacts, etc.  When prompted, you will probably want to choose merge, to merge the data on your phone with the existing data on this iCloud account.

  • I am running XP SP2 fully patched. I recently upgraded to 3.6.3 and since then, clicking on an icon that normally would open another windows (for example, a printer-friendly version of the current web page), nothing happens. In these situations, I have be

    I am running XP SP2 fully patched. I recently upgraded to 3.6.3 and since then, clicking on an icon that normally would open another windows (for example, a printer-friendly version of the current web page), nothing happens. In these situations, I have been forced to go to IE or Crome in order to accomplish what I need to do. Very frustrating. Also clicking in the slider area has no effect. "Page Up" and "Page Down" keys work. Holding down left mouse button on slider works. Also very frustrating. Can someone help
    == This happened ==
    A few times a week
    == Upgraded to 3.6.3.

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • How to change the color for HTML words in JEditorPane?

    Hi Sir,
    In the JTextPane , we could change the word's color by using:
    Style style = doc.addStyle("test",null);
    StyleConstants.setForeground(style, Color.red);
    doc.setCharacterAttributes(10,20,syle,true);
    we can change the text into red color,which range is from 10 to 30.
    But how to change the color for HTML words in JEditorPane?

    Hi,
    you can use an AttributeSet to apply the foreground color. Let's say, doc is a HTMLDocument, then SimpleAttributeSet set = new SimpleAttributeSet();
    doc.getStyleSheet().addCSSAttribute(set, CSS.Attribute.COLOR, "#0D0D0D"); would apply a color to a given AttributeSet. The AttributeSet with your color then can be applied to a selected range of text in a JEditorPane by   /**
       * set the attributes for a given editor. If a range of
       * text is selected, the attributes are applied to the selection.
       * If nothing is selected, the input attributes of the given
       * editor are set thus applying the given attributes to future
       * inputs.
       * @param editor  the editor pane to apply the attributes to
       * @param a  the set of attributes to apply
      public void applyAttributes(JEditorPane editor, AttributeSet a) {
        ((HTMLDocument) editor.getDocument()).getStyleSheet().addCSSAttribute(set, CSS.Attribute.COLOR, "#0D0D0D");
        editor.requestFocus();
        int start = editor.getSelectionStart();
        int end = editor.getSelectionEnd();
        if(end != start) {
          doc.setCharacterAttributes(start, end - start, a, false);
        else {
          MutableAttributeSet inputAttributes =
            ((SHTMLEditorKit) editor.getEditorKit()).getInputAttributes();
          inputAttributes.addAttributes(a);
      } Ulrich

Maybe you are looking for

  • Profit Centre Accounting Balance Carry Forward

    Hi I used report painter to create my own report to show the TB by profit centre. But the when you drill down on certain balance sheet account the actual line items date back to as far as 2004. Is it because we have done a balance carry  forward? How

  • Search on a FBA site

    I have a sharepoint 2007 site witch run with AD login, and have been extended with a custom FBA login. It's all working great except the search on the FBA site. On the AD site, the content is security trimmed correctly, but on the FBA site, which don

  • Can real estate post without a tax code?

    Hi there My client has a number of G/L accounts which have the flag/indicator "Posting without tax allowed". How can I configure the SAP REFX tax codes to post using no tax indicator. If you leave the tax code blank in the config, it reports that the

  • Discoverer9 and EUL column security

    I am seeking suggestions to resolve my problem. We're using OracleApps 11.5.7 + Discoverer9 and installed the BIS views. Now it is time to create my EUL, works fine. Then Securing the data... here we go. For the row security, the BIS views uses some

  • Update primary key

    Hi I am using weblogic 7.0 and ejb 2.0 I have a requirement where i would want to update my primary key. If i understand right , In ejb you are not allowed to update one of the primary key column of composite primary key. Now if i have to update this