Opening HTML

Im writing a java application which creates HTML files which can be viewed and printed out by users.
Once I have created the files though, I need them to automatically load up in the default browser (it can be for only IE). Im just not sure how to do this. Any ideas,
Thanks for any help!

hi,
you could shell out a command to launch the html in ie, like:
class helpAction extends AbstractAction {
          //  Constructor
          helpAction(String name, String tooltip) {
               super(name);
               if(tooltip != null) {
                    putValue(SHORT_DESCRIPTION, tooltip);
          public void actionPerformed(ActionEvent e) {
               try {
                    Properties systemProps = System.getProperties();
                    String osVersion = systemProps.getProperty("os.name");
                   if (osVersion.equals("Windows 98"))     {               
                         Runtime.getRuntime().exec("start \"helpFi~1/helpIndex.htm\"");
                    else if (osVersion.equals("Windows 95"))     {               
                         Runtime.getRuntime().exec("start \"helpFi~1/helpIndex.htm\"");
                    else {
                         Runtime.getRuntime().exec("cmd.exe /c start helpFiles/helpIndex.htm");
               }catch(IOException err) {
                    JOptionPane.showMessageDialog((Component)e.getSource(), "Help File Not Found!", "ERROR!", JOptionPane.ERROR_MESSAGE, new ImageIcon("questionmark.gif"));
                    JOptionPane.showMessageDialog(null, "start \"helpFi~1/helpIndex.htm\"");
     here for example clicking a button would launch the default browser, ie lets says, and display help.html.

Similar Messages

  • How Can i open Html file in a Browser from Jar file

    Hi
    i am having Html help files inside my Jar file ... if i use
    getclass().getRource("\lib\start.html");
    it is not opening ... so i have to ship seperate folders for html files along with jar files.... can anyone give the solution to have(open) html files inside the jar file and to open then in a default browser of any OS
    Regards
    Ganesan S

    the follwing method i have used to open html file ...
    so to access html file i am shipping resources folder with jar file ..
    private void openHtmlPages(String pageName) {
         String cmd[] = new String[2];
         String browser = null;
         File file = null;
         if(System.getProperty("os.name").indexOf("Linux")>-1) {
              file = new File("/usr/bin/mozilla");
              if(!file.exists() ) {
              }else     {
                   browser = "mozilla";
         }else {
              browser = "<path of iexplore>";
         cmd[0] = browser;
         File files = new File("");
         String metaData = "/resources/Help/Files/"+pageName+".html"; // folder inside jar file
         java.net.URL url = this.getClass().getResource(metaData);
         String fileName = url.getFile();
         fileName = fileName.replaceAll("file:/","");
         fileName = fileName.replaceAll("%2520"," ");
         fileName = fileName.replaceAll("%20"," ");
         fileName = fileName.replaceAll("jarfilename.jar!"," ").trim();
         cmd[1] = fileName;     
         try{
              Process p = Runtime.getRuntime().exec(cmd);
         }catch(java.io.IOException io){
                   //Ignore
    can anyone give me the solution..???
    Regards
    Ganesan S

  • Can't import/open HTML files in Fireworks CS4

    I'm trying to import/open HTML files into Fireworks CS4 to do some redesigning. I inherited the job of redoing my companies website and we believe the person who created our website created the site using Dreamweaver 8. Unfortunatley that person moved on to a new job across the country and we can't ask him exactly how he created our website.
    When I try to open some of the HTML files in FW I get the message: "Could not open the file....Fireworks could not find an HTML table in this file". Next I tried creating a new, very simple HTML page in Dreamweaver CS4 that contains just a few lines of text and 1graphic (we just bought the CS4 web suite). Again, I get the same error.
    Other files give me a slightly different error message when trying to open them in FW, "The HTML document contains one or more images with absolute web addresses for the source. Fireworks cannot handle these images. --click OK-- (next error message) Could not open the file. Fireworks has encountered a problem with the HTML in this table. Verify that the HTML is valid"... and then it closes and nothing loads into FW. Bummer.
    I've searched on these forums and can't find any solutions to this problem although I found a few people experiencing the same problem.
    Do I need to do something to the Dreamweaver created HTML's to get them to open in FW? Any help would be appreciated.

    Fireworks is a graphics editor that can export code; it is not an HTML/code editor.
    If you have exported HTML from Fireworks, you ought to be able to re-import that, but I would think most people who use Fireworks exported code would just modify their Fireworks document and re-export. (Fireworks' code is not robust and it is only intended for mockups and prototypes. Fireworks is not intended for developing and maintaining live Web sites; Dreamweaver is.)
    If your developer used Dreamweaver, then I really don't expect that Fireworks would be able to import that, nor any code that isn't in exactly the format that it can export. If you know your developer used Fireworks, then you need to look for .png files. Fireworks uses an enhanced version of the PNG format for its native document format.
    If you are making small adjustments to your site, then you might be better off working in Dreamweaver. If you're doing a site re-design, then Fireworks is an excellent tool for laying out your design and producing your graphics, but you will, at some point, need to move over to Dreamweaver for coding.

  • Can No Longer Open html files

    I Fireworks 8, I was able to save a web page as a complete
    document to the local drive and then open it with Fireworks to work
    with it. With CS3 all I get is a totally white canvas. I have
    checked that my preferences are all set the same, and they are. I
    use this feature all the time for a variety of functions, i.e.,
    combining slices to make one gif, etc. Am I missing something - or
    is that function no longer there?
    It shows it can open Html files, but it will not even open
    it's own exported html files. Get "internal error." The file is
    fine ( and it just created it.)

    No, it is not a bug at all. It is all about how you do this
    and understand the primary functionality of Fw itself, and how it
    do for you. If you don't fully understand how it works, then you
    have problem trying to understand how it works and what's not.
    Then, perhaps that you clearly do not understand the
    functionality of Fw CS3, and how it relates to exported HTML files
    created by Fw CS3.
    It is very common, wide misunderstanding among other,
    especially with newbies using Fw app, and they thought that if Fw
    could create HTML code. Actually, it was created by side of
    pre-scripted coding inside the app itself, and that it does the
    rest for you.
    As for working with sliced images around Fw CS3, as any
    legacy versions of Fw, the concept of sliced images is often up for
    the air and debates. Everyone have different opinion about sliced
    images, and what not and what's cool.
    I personally dislike sliced images. If having lots of sliced
    images, means slower downloading time and more codes involved.
    I get the feeling that you really not understand how Fw
    works, and how it relates to your question about HTML code in Fw.
    Please try to understand that FW itself CANNOT edit HTML. It only
    just exports html code for you. However, it is important to note,
    it is NOT perfect html code.
    It is best IF you work with pre-scripted HTML code in
    Dreamweaver, or any web authoring app to work with HTML directly.
    If you are not taking my advice, so be it. I am out of this
    discussion. End of discussion!
    And good luck!
    quote:
    Originally posted by:
    lloydtennison
    No. I mean for editing the images. The open command even
    shows html as an option to open, it just does not open the file at
    all. I just creates a new one.
    The reasons for opening an html file in Fireworks have
    nothing to do with Dreamweaver or coding, just images and image
    manipulation. If open html is an option, as it is, it should open
    the file. It used to open with all slices intact, and all html code
    behind it. Now it just opens a white page.
    It is a bug and problem since it does not do as it should.

  • Occasional problem opening HTML attachments to Calendar Events

    Does anyone know why I sometimes get the following screen when tryint to open HTML links that I add as attachments to calendar events?  Sometime the links work flawlessly and sometimes I get this screen which requires 4-10 "cancels" to remove from view.  then the site I was trying to reach is in a raw, disabled format.  Thanks!!

    These two links should help out, courtesy of dmfs.org and dyndns.org:
    http://dmfs.org/wiki/index.php?title=MeetingMaker
    http://ntbab.dyndns.org/apache2-default/seite/caldavprovider.html
    This was driving me nuts. Bought a new laptop and boom, try to check my icloud mail and the same symptoms you described plagued me. Thought Windows 8 had to be the culprit until I saw your post and screenshot. Good luck getting your issues resolved. There isn't much sympathy for Windows users and their silly little problems around here...

  • How to search a string in all opened html report ?

    Hey people .. Sorry to bother U again.. I have a problem again.. and thanks to solve my previous problems...
    I want to make an application in which I want to search a result string
    in all opened Html reports... If I don't want to go to the all
    desination and search one by one.. Is there any method to search the
    result in all opened reports at that time..
    I am very confulsed .. I have no Idea how I am gonna solve it... If anybody can help.. I would really appreciate that.. Thanks..

    Thanks Justin I have managed that problem..
    I am stuck at another one.. If you can help.. I have also posted addressing you in another relavent Thread..
    I have a spreadsheet data which has 286*516 Pixels data. Data is 16bit
    (from which only 12bit is usefull). Each data is a Level of a Pixel. I
    want to Display Grayscale Image.
    I have used 3D Graph to display it and projection XY selected . I am
    getting My image as grayscale Image but somewhat slow display if I
    continously run it.
    Second Method I tried is Directly "some 2D Graph" ( Sorry I forgot the
    Name.. I will get it next time) which directly display that 16 bit
    spreadsheet file. But it has only 255 levels so it didn't utilized my
    data and resolution is poor.
    My doubts are..
    1. Is 3D graph method I am using is Actually displaying my 16 bit image.
    2. In 3D graph method : Because of that 12 bit format of my data and I
    had to convert it in 16 bit I am loosing any levels or       
        Resolution ?
    3. Is there any way of increasing 255 level to 16bit level 2D Graph method.
    4. Is there any method that can display my 16bit information as a image utilizing all my levels.
    Please Do me a favor .. thank you

  • Opening HTML files

    Hi there,
    I'd love someone giving me a bit of help about this...
    AFAIK, Nokia S40 phones can't open an html file stored locally (in the phone's memory or memory card), although they can if that file is accessed through an internet connection.
    So... is there a method or piece of software that I could use to open HTML files stored locally? (I've tried some Java browsers, including Opera Mini, but they all seem only fit for online browsing).
    Thanks a lot,
    Marcos

    ok so i just realized that it doesn't make sense for a program outside the jar, like IE or Firefox, to be able to access and open a file inside of the jar. I am now looking for suggestions on how to work around this problem for my program to be able to have a simple help system located inside the jar that can be loaded during runtime.
    Thanks for your suggestions.

  • How to open html file in forms6i ?

    Hi Guys,
    Can anyone help in out in this regards.How to open .html file in forms6i ?
    Thanks in advance
    raj

    Check out WEB.SHOW_DOCUMENT.
    Regards
    Grant Ronald
    Forms Product Management

  • Can I include both CSS and HTML codes in one Open HTML Editor.

    Somehow Cell phones are not properly reading css codes. Is there any way to include both CSS and HTML codes in one Open HTML Editor?

    Hammad, their code is fairly mobile friendly.  Per my other discussion with you ( http://topliners.eloqua.com/thread/8532 ), Eloqua's code is responsive for the most part.  Most of their issues lie with the styling of the email where you will get different fonts and different sized fonts throughout the email and some other minor display issues.
    What you are trying to accomplish is extremely difficult to do because you do not have the access to the HTML to better control how the responsive template works which is why the Eloqua templates (and most ESP templates) stick to the more basic side of emails.
    If you want to use Eloqua's WYSIWYG to make their responsive email you can do so, but I would recommend deleting all their body text before editing anything because of the inconsistencies in their code.  Otherwise, I think you would be better off coding the emails outside of Eloqua using a 3rd party editor whether it's something more robust like Dreamweaver or Coda, or whether you feel comfortable working in a more text environment with programs like Notepad++ or Brackets.
    At the end of the day remember you are paying Eloqua for these and if you choose to stick with the WYSIWYG and you are not getting the results you expect you need to tell Eloqua through your support channels.

  • Opening HTML window from LabVIEW

    Please,help. How can I open HTML window from LabVIEW?

    Hi A Kirsanov,
    I posted this to bmihura, but it's probably more applicable to you.
    Hope it helps
    Charlie Rodway
    Test Design Engineer
    Rolls-Royce Controls and Data Services Ltd
    Attachments:
    WebBrowser.vi ‏21 KB

  • Open html inside flash it´s posible?

    open html inside flash it´s posible?

    I've been trying to create a link in flash8, to link to an
    html page the whole week, no success at all. I dont think anyone in
    this
    forum's got any answer to that. When I run the swf file alone
    it works but as soon as I import it into Dreamweaver, all links to
    an html file created in flash fails.But if by any chance you get
    the answer please would u send it to this emall address:
    [email protected]

  • How to open HTML code in Safari

    I am trying to create an HTML code signature with a link to Facebook .
    The instructions are to create the signature in mail preferences then open HTML file in Safari.
    I am Stumped.
    Here is the link with the instructions.
    http://www.createarevolution.com/blog/2008/02/07/creating-an-html-signature-in-a pple-mail/
    I can create the signature in mail preferences but item #4 was to go to Safari and open HTML file..
    where is it and what do I do next.

    The instructions are to create the signature in mail preferences then open HTML file in Safari.
    Leave the copy in Mail blank and enter the HTML in TextEdit or TextWrangler. Save as plain text.
    (57642)

  • Hotkey for switching between open html pages similar to Apple+Tab for apps

    Is there a hotkey combination which can switch between open html documents in the same way Apple+Tab switches between open applications?
    In Windows it is possible to switch use ALT+TAB to switch between various open Firefox windows which are displayed as options along with other open applications -- but OSX seems to limit choices only to applications, and not their various windows. ?
    Thanks

    Hmm...sorry...just switched yesterday afternoon...this combo though doesn't seem to be working for me in either Firefox or Safari...tried Command+< also with the SHIFT key for '<' but to no avail.
    Mind if I ask a two more simple questions though? How can the touchpad be setup to automatically register a click by tapping on the touchpad rather than the button beneath it...and...is there a hotkey combo which would take a person back to the beginning of a text field, similar to 'Home'? Haven't yet figured out how to make the arrow with "home" on it actually send the cursor back to "home"...
    many thanks

  • Open Html file

    How i can write a program can open html file?

    Well I dunno what he meant but I'd like to know how
    to open a html file on my hard-drive from a java
    application.Just like you open any other file on your hard drive.

  • Safari 7.0.5 unable to open html file

    I used to be able to open HTML files in Safari so I can read the content but now it won't let me. Safari 7.0.5. Is there an issue with this version? I am also unable to see some content in our SalesForce app for work. Would a different version of Safari fix this?

    You may have installed "SearchMe" or some other malicious Safari extension.
    From the Safari menu bar, select
              Safari ▹ Preferences... ▹ Extensions
    Remove all extensions with the word "Spigot" in the description. If in doubt, remove all extensions. Do the equivalent in the Chrome and Firefox browsers, if you use either of those.

  • Why does "Open HTML Report in Broswer" crash on some machines?

    I've been using the "Open HTML Report in Browser" subvi to generate simple printable reports from a control program, but the program hangs on the control system PCs. I am running Win2000 with IE on my programming box, but on the XP machines with IE and Mozilla running the LabView 7 runtimes the program will hang in the Open HTML Report subvi every time. Is there any known cause for this? Are there any alternatives?

    rsd212 wrote:
    I am running Win2000 with IE on my programming box, but on the XP machines with IE and Mozilla running the LabView 7 runtimes the program will hang in the Open HTML Report subvi every time. Is there any known cause for this? Are there any alternatives?
    Hello rsd212,
    The behavior we you are seeing is probably due to the security policies set up on your windows XP machine. Have you installed Service Pack 2 on the machine?
    One way to check if is this is security policy issue is to force the report VI to open the browser with the System Exec VI instead of using DDE. You can do this by opening the Open URL in Default Browser Core subVI inside Open HTML Report in Browser -> Open URL in Default Browser and changing the code to always run the System Exec version and skip the DDE version.
    If this works you can either keep the VI as is or revert to the original version and troubleshoot what security policy is preventing DDE from working on your computer.
    Please let me know if you have any questions.
    Regards,
    Matt
    Keep up to date on the latest PXI news at twitter.com/pxi

Maybe you are looking for

  • Keys stopped working; HELP!!

    So over the last day my delete key, return key, right hand shift key and right arrow key all quit working. Restart computer, checked for software updates, I think its a hardware issue. Can't see anything obvious underthe keys and they seem to move li

  • Console access through USB- Solaris x86

    Hi, I installed Solaris 9 on my laptop, Compaq Presario V2000 Series. My laptop does not have a Serial Port attached. I was wondering whether I can access the console through USB . And if so, can you please also provide me the instructions on how to

  • Safari draining battery

    I have a 2012 MacBook Pro and lately I've noticed my computer is running very hot while using Safari, and only Safari. My battery says normal, but since my comp is running hot the battery is draining very quickly while Safari is open. I cleared all c

  • Cisco 1760 and VoIP gateway

    Hello NetProf! I'm repeating my request for help, mabey clearing a few things out. 1. We have a cisco 1760 router running CCME 2. Some connected to it cisco 79xx ip-phones 3. A third party gatekeeper - MikroTik router 4. Every device is logged in the

  • Internet connection - only works wirelessly

    I have a two pronged issue. 1) I have not been able to get on the internet via my cable modem (comcast), only through a wireless connection using my neighbor's access. I called Comcast's tech support and they said the cable connection and modem are j