I need to show an html file from an application

Hi there!, I really need your help...
I have the absolute path in an String variable:
String fileHTML = "C:\\AllCitiHTML\\GeneralHTML_Files\\Temp\\2002030925General.htm";
Now, I need to show this page in a browser(explorer or netscape) but the page must be showed in both.
I tried with this code, but it doesn't show nothing
String urlName = fileHTML;
String browser = "iexplore ";
Runtime.getRuntime().exec(browser + urlName);
in addition it would only serve for explorer and not for netscape.
reply this message with all the possible code that you can use...
Please I need help very urgent, thanks

Multiple cross-post.

Similar Messages

  • Help Needed in opening a HTML File from swing application

    Hi,
    I am opening a HTML file in Internet Explorer from my swing application.
    I am using the code given below
    private final static String WIN_FLAG = "url.dll,FileProtocolHandler";
    private final static String WIN_PATH = "rundll32";
    String cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
    // url is HTML file Path
    Process p = Runtime.getRuntime().exec( cmd );
    The HTML file is opening up,but it always opens behind the swing application,that makes me every time to maximize the HTML file after it being opened up.
    I want to open it in front of the Swing Application.
    Any Help Please ?
    - Manikandan

    Check your Application's JFrame properties (may be ur Frame is set to be in top position ,always),and also check running your application in some other OS.

  • To show a html page from java application

    hi everyone,
    I am trying to show a html page through java application. What i tried is Runtime.getRuntime().exec("start url"); this shows it opens default browser. It works fine for win Nt but does not work on win98 or linux.
    Is there any other way of achieving the same?
    can anyone help me in this regard. I am in urgent need of it. any reply will appreciate.

    I hope this works.
    String urlName = "http://forum.java.sun.com";
    String browser = "iexplore "; //EXE file name --> for iexplore.exe
    Runtime.getRuntime().exec(browser+urlName);

  • Write HTML Files from java application

    Hello,
    i have to write HTML files from a java application.
    I am asking if anybody can give me a hint about a good simple solution (library) which can do some of the job for me.
    i know FOP for example is good to create pdf or html from xml, but i dont want to go via xml.
    the sites i need are really very simple presents emails.
    body and maybe a link for next and pervious.
    however, thank you in advance.
    a little hint will also help :)
    Sako.

    That, too, is my question.
    Be the "server" local or remote, wouldn't JSPs still
    be the easier solution? No. it will not. because you need a server. Server for a stand alone application is not esier. according to who said JSPs are easy?
    Its very very difficult.
    >
    When answering, please clarify. I'm a bit of a newbie
    here. :)To get sence about how hard is JSP, check Struts. this is very good open source Framework to simplify the JSPs. but it still complecated enough.
    or Tapestry my lovely open srouce Framework.
    its easier than Struts. but sill complecated because of the documentation.
    All in all, using JSP is the purpose of Java in the internet. but not for me. My application will not be available in the internet, i.e. no server, i.e. no need for JSP.
    i hope that helps a little.

  • Execute html file from java code - urgent!!!

    Hi,
    I need help!!
    My application should open html file that located in my computer
    it should be open when some line in JList was choosen
    my question is: How can I open html file from my application
    I work with window XP
    I tried this one :
    Runtime.getRuntime().exec(cmdLine);
    but it doesn't work
    the exeption was: CreateProccess
    Please help! it's urgent!!!!

    http://forum.java.sun.com/thread.jsp?forum=31&thread=497600

  • Help to show a HTML file in Swing

    Hiiiiiiiiiii,
    During my development Me in a problem . Please help me out.
    As per my current context of the project I have to develop a HTML page with Help of CSS and all other things. After that I have to Show the HTML file through Swing. I know how to attach a file with help of URL but need some help to show a HTML file in Swing.
    *help to show a HTML file in Swing*

    As camickr said Javascript support is not available. If you want to support you have to write code for that. Up to an extent CSS support is provided.
    Sample code to display HTML pages in JTexPane (you can use JEditorPane as well):
    Construct the URL:
    URL url = YourClass.class.getResource("resources/Hello.html");
    // If YourClass is in package test.html, then your html page must be available in .....test/html/resources directory.
    // And your CSS files must be accessible from your HTML page. This you can test by simply opening the html
    // page in your favorite browser.And then call setPage() method of HelpDataPane. Note that, HelpDataPane supports hyperlink activation.
    import java.io.IOException;
    import java.net.URL;
    import javax.swing.JTextPane;
    import javax.swing.event.HyperlinkEvent;
    import javax.swing.event.HyperlinkListener;
    * A pane to display help pages. Help pages are accessed as URL and displayed
    * in this pane.
    * @author Mrityunjoy Saha
    * @version 1.0
    public class HelpDataPane extends JTextPane {
         * Creates a new instance of {@code HelpDataPane}.
        public HelpDataPane() {
            super();
            this.addHyperlinkListener(new HyperlinkListener() {
                public void hyperlinkUpdate(HyperlinkEvent e) {
                    if (e.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) {
                        setPage(e.getURL());
         * Sets the current URL being displayed.  The content type of the
         * pane is set, and if the editor kit for the pane is
         * non-{@code null}, then
         * a new default document is created and the URL is read into it.
         * @param page The URL to be displayed.
        @Override
        public void setPage(URL page) {
            try {
                super.setPage(page);
            } catch (IOException ex) {
                try {
                    URL blankURL = YourClass.class.getResource("resources/Blank.html");
                    super.setPage(blankURL);
                } catch (IOException ioe) {
                    ioe.printStackTrace();
    }Thanks,
    Mrityunjoy

  • Open html file from Applet

    Hi,
    I need to open html file from applet, the html file is placed in my local system, it is not open. the code is below, please can u tell where i did wrong.
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    <applet code="Resource.class" width="400" height="400"></applet>
    public class Resource extends Applet implements ActionListener
    Button b = null;
    public void init(){
    b= new Button("Click");
    add(b);
    b.addActionListener(this);
    public void actionPerformed(ActionEvent ae){
    try
    URL adress = new URL(getDocumentBase(), "html_code.htm");
    getAppletContext().showDocument(adress, "_blank");
    System.out.println("Execut inside"+adress);
    }catch(MalformedURLException e){
    System.out.println("Eror in Display");
    }

    Don't cross post
    http://forum.java.sun.com/thread.jspa?threadID=633500

  • Have CS5 and CS6.  Need to reduce size of file from 6Mb to 2 Mb for contest purposes without losing original

    Have CS5 and CS6.  Need to reduce size of file from 6Mb to 2 Mb for contest purposes without losing original

    Just save the document to a new jpeg file name using a lower quality setting or re-size the image down in  size the save a high quality smaller new jpeg image.

  • Delete html file from server

    Hi,
    I need to create a html file on a websphere server and after I work with it I need to delete the html file. I can create this file but when I'm trying to delete the it, doesn't work. If this file is not a html file it works, why?
    I know, the solution could be, not to create a html file, but I need a file with htm/html extension. Does anybody know how I can solve my problem?
    Thanks in advance.
    Cris

    hi,
    try this code..
    test1.jsp --->
    <% java.io.FileOutputStream fo = new java.io.FileOutputStream(getServletConfig().getServletContext().getRealPath("/")+"\\test.html");
    fo.close();
    fo = null;
    System.gc();
    %>
    <%!
         public void finalize(){
              System.out.println("Deleted!!");
    test2.jsp --->
    <%
    java.io.File file = new java.io.File(getServletConfig().getServletContext().getRealPath("/")+"\\test.html") ;
    file.delete();
    file = null;
    System.gc();
    %>
    <%!
         public void finalize(){
              System.out.println("Deleted!!");
    %>
    and tell me , you know anything more..
    ( I could think of only closing of the file, other wise , the file was not deleting untill the Garbage collector was called on the servelt)
    Once the garbage collector runs and destroyes your servlet , then in the
    subsequent request (code with delete) used to work..
    If you know more .. Let me know
    with Regards
    Lokesh T.C

  • Generate an HTML file from a Report in ABAP

    Good morning,
    How I could generate an HTML file from a report.
    Any Ideas... I have found the function WWW_ITAB_TO_HTML, but someone has the standar code and how use this function?
    Thanks a lot,
    Hernán Restrepo

    Hi,
    I am facing a similar problem.I did try using the function module WWW_ITAB_TO_HTML in the reoprt program, as I'm trying to generate a url from a report, but i'm not able to get the expected results. The code is given below. Could someone please try and help me resolve this issue.Thanks in advance.
    DATA:   emp_name                     TYPE char80.
    DATA:   it_itabex                    TYPE zdb_ex_tty,
            it_emp                       TYPE TABLE OF zis_emp,
            it_org                       TYPE TABLE OF zis_org,
            it_pos                       TYPE TABLE OF zis_pos,
            it_pos_alloc                 TYPE TABLE OF zis_pos_alloc,
            it_res                       TYPE TABLE OF zis_res,
            it_res_alloc                 TYPE TABLE OF zis_res_alloc,
            ls_itabex                    TYPE zdb_ex_s.
    DATA:   lv_filename                  TYPE string,
            lv_path                      TYPE string,
            lv_fullpath                  TYPE string,
            lv_replace                   TYPE i.
    DATA qstring LIKE it_itabex OCCURS 10.
    DATA: url(200), url2(200), url3(200), fullurl(200).
    FIELD-SYMBOLS: <fs_emp>              LIKE LINE OF it_emp,
                   <fs_org>              LIKE LINE OF it_org,
                   <fs_pos>              LIKE LINE OF it_pos,
                   <fs_pos_alloc>        LIKE LINE OF it_pos_alloc,
                   <fs_res>              LIKE LINE OF it_res,
                   <fs_res_alloc>        LIKE LINE OF it_res_alloc.
    Report Program to export data from database to Excel.
    Populate all the tables that have to be exported.
    SELECT * FROM zis_org       INTO TABLE it_org.
    SELECT * FROM zis_pos       INTO TABLE it_pos.
    SELECT * FROM zis_pos_alloc INTO TABLE it_pos_alloc.
    SELECT * FROM zis_emp       INTO TABLE it_emp.
    SELECT * FROM zis_res_alloc INTO TABLE it_res_alloc.
    SELECT * FROM zis_res       INTO TABLE it_res.
    Append the Column Header
    CLEAR ls_itabex.
    ls_itabex-ipp_pos_id            = 'IPP Pos ID'.
    ls_itabex-emp_name              = 'Name'.
    ls_itabex-dt_of_join            = 'JoinedOn'.
    ls_itabex-emp_status            = 'Status'.
    ls_itabex-org_name              = 'Org'.
    ls_itabex-prj_name              = 'Project'.
    ls_itabex-mgr_name              = 'Line'.
    ls_itabex-designation           = 'Designation'.
    ls_itabex-specialization        = 'Specialization'.
    APPEND ls_itabex TO it_itabex.
    Append all the tables into one internal table
    LOOP AT it_pos_alloc ASSIGNING <fs_pos_alloc>.
      CLEAR ls_itabex.
      ls_itabex-ipp_pos_id          = <fs_pos_alloc>-ipp_pos_id.
      READ TABLE it_emp ASSIGNING <fs_emp> WITH KEY emp_guid = <fs_pos_alloc>-emp_guid.
      IF sy-subrc = 0.
        CONCATENATE <fs_emp>-emp_fname <fs_emp>-emp_lname INTO ls_itabex-emp_name  SEPARATED BY space.
        ls_itabex-dt_of_join        = <fs_emp>-dt_of_join.
        ls_itabex-emp_status        = <fs_emp>-emp_status.
        ls_itabex-specialization    = <fs_emp>-specialization.
      ENDIF.
      READ TABLE it_pos ASSIGNING <fs_pos> WITH KEY ipp_pos_id = <fs_pos_alloc>-ipp_pos_id.
      IF sy-subrc = 0.
        ls_itabex-designation       = <fs_pos>-designation.
        READ TABLE it_org ASSIGNING <fs_org> WITH KEY  org_id = <fs_pos>-org_id.
        IF sy-subrc = 0.
          ls_itabex-org_name        = <fs_org>-org_name.
          ls_itabex-mgr_name        = <fs_org>-mgr_name.
        ENDIF.
      ENDIF.
      READ TABLE it_res ASSIGNING <fs_res> WITH KEY org_id = <fs_org>-org_id.
       ls_itabex-org_name         = <fs_org>-org_name.
      APPEND ls_itabex TO it_itabex.
    ENDLOOP.
    url = 'http://testweb/scripts/wgate/zvw10a/!?~language=en'.
    url2 = '&~OkCode(LGON)=LGON&login-login_user='.
    url3 = '&vbcom-vbeln='.
    CONCATENATE url url2 url3 INTO fullurl.
    WRITE: /'Staffing Excel'.
    CALL FUNCTION 'WWW_SET_URL'
      EXPORTING
        offset        = 12
        length        = 10
        func          = fullurl
      TABLES
        query_string  = qstring
      EXCEPTIONS
        invalid_table = 1
        OTHERS        = 2.
    Thanks & Regards,
    Preethi.

  • When i open any .HTML file from my computer it is not opening in firefox. Only a blank New Window Opens. Facing this problem since the firefox has updated.

    Whenever i try to open any HTML file from my computer, it opens a new firefox window which is blank. Facing this problem after the new update. please fix this problem

    I found that after Firefox v29, a LOT of my settings and<BR>
    add-ons were changed / reset. Try this;
    '''''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Start Firefox in Safe Mode]'''''
    <BR>While you are in safe mode;<BR>
    '''''Firefox Options > Advanced > General'''''.<BR>
    Look for and turn off '''Use Hardware Acceleration'''.<BR>
    Then check ALL of your settings. Browser and add-ons. Then restart.

  • Camera raw 7.2 will not install within CS5.5, but need it to read nrw files from P7700.

    camera raw 7.2 will not install within CS5.5, but need it to read nrw files from P7700. Besides DNG Converter, what can I do to use files directly?

    Your next option is to upgrade photoshop. If you can't afford the full version (less than $20/month) you could get elements, it uses the latest version of camera raw, but I think it is a stripped down version though.

  • How to show an HTML file (more then 1MB size) in JEditorPane

    I an trying to show an HTML file (more then 1 MB size ) in JEditorPane
    but getiing OutOfMemory error.
    if i try the same for size less then 1 MB(i tried till 850KB) then it will work fine.
    I am using setPage() method of JEditorPane.
    please provide solution .

    I meet the same question, and even worse.
    I created a html file with frameset, when i point to the link which is an html file larger than 500kb . it fails. and some error "infinite loop in formatting" is thrown
    in javax. swing.text.FlowView. I read the code of this class, and can't tell what's the error of my application.
    Can someone help and give some answer?

  • How to run .html file from .java file..?

    Hi All,
    I was just trying as mentioned in the subject of how to run an html file from a java file.We have runtime class which inturn is having exec method which returns process but it supports only .exe as an argument .Is there any way to do this???
    Thanks in advance.

    viswa07 wrote:
    You mean to say Desktop class in java...???I'm so sorry, I thought you knew enough Java to look up the API.
    [This link|http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html] might be more at your level.
    db

  • Adf11g how to open pdf or html files from  webservice

    hi all,
    adf11g how to open pdf or html files from webservice .

    Hi,
    This is standard functionality, that you can read more about in the OLM User Manual. You can upload the files to an OLM content server or to any other content server that can be accessed with a URL.
    Regards Anders Northeved

Maybe you are looking for

  • No DAD configuration Found

    Please if somebody can help. My TNS Listener is running and database us up.Connecting to portal home page is giving me "Proxy log on failed" together with the message "TNS could not resolve service name" In http://192.168.1.101/pls/portal30/admin_/da

  • Error "svr.unknown" in Folio Builder panel

    We are unable to log in to the Folio Builder. We tried all of the suggestions here - http://kb2.adobe.com/cps/915/cpsid_91536.html - and nothing worked. Is there an error on Adobes end?

  • Job work to customer

    Dear Sir, We are doing Job Work to Customers, in this case Customer is sending their material for job work, we undertake job work and finish whatever they asked and send the material back to them along with the scrap. How do we map this scenario in S

  • Upgrading student

    Hi, Here in Australia we have two discounted versions of master collection - one for students approx $500 and one for educational approx $1300.  My understanding is that the educational can be used for commercial purposes but not the student version.

  • WAAS/WAE - CM required?

    We are going to be evaluating Cisco's WAAS technology soon. I've heard conflicting information on the central manager - some say that a central manager is required, and others (including some of Cisco's documentation) state that the WAE can be config