Jbutton to open a htm file in browser - simple question

not sure where to look for this, but its a simple question
I just want to get a jbutton (from a jFrame)to open a local htm page eg:
When pressing the button open:
C:\Documents and Settings\****\My Documents\profile.htm
- Open this with any browser
any pointers to look in the right direction, couldn't find it with search
I dont want to use a JEditorPane to display the htm, just open any browser
Edited by: Mr_Tuition on Dec 7, 2007 3:40 AM

I also wont be able to use it to open an local file which will be set up differently on each computer:
C:\\Documents and Settings\\***\\My Documents\\JavaProjX\\Preview\\profile.htmI want to use just: Preview\\profile.htm so it opens from the same location with different users, but
try { Process process = Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE Preview\\profile.htm");}
     catch(IOException e) { System.out.println("could open IE");}opens: http://preview/profile.htm (incorrect location)
I have just found I can use System.getProperty("user.dir"); to get the location of my program (i think)
Edited by: Mr_Tuition on Dec 7, 2007 4:25 AM

Similar Messages

  • Unable to open .htm file in browser using SharePoint 2013 ?

    On Share Point 2013 we had .htm file which was published under excel as shown below (File name t1.htm)
    As the Icon is different from normal excel file.
    My question is why the .htm file is opening in Excel when we access from SharePoint Web Interface ?
    And when we use the option "Open in Explorer" it opens the .htm file in browser.
    I need the publish .htm file needs to be open in Browser.
    Thanks for reply.

    Looking at this a little more closely, what happens is when you upload the Excel HTM file, a folder is also uploaded to the Library (but hidden outside of the WebDAV view). This folder would be named "t1_files" in your case. If this folder is present (which
    it needs to be as t1.htm references files within it, including all of the sheets), then it will attempt to open with the client application because of the association within C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\XML\DOCICON.xml,
    referring to the line:
    <Mapping Key="Excel.Sheet" Value="ichtmxls.gif" EditText="Microsoft Excel" OpenControl="SharePoint.OpenDocuments" OpenApp="ms-excel" />
    Removing this line will cause it to be treated as a standard HTM file, but I'm not sure how that will work out for your scenario.
    The other option is to install and configure Office Web Apps 2013 on a separate server so you can display Office documents in the browser.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • I am trying to get help with WMPlayer tech support Adobe Reader cant open wmpsupport.htm files why?

    i am trying to get help with WMPlayer tech support Adobe Reader cant open wmpsupport.htm files why?

    Adobe Reader opens PDF files, nothing else.

  • Unable to view SAP Help files --Cannot Open Frameset.htm Files from 'help.s

    Unable to view SAP Help files --Cannot Open Frameset.htm Files from 'help.sap.com'
    Open Internet Explorer
    Types in http://help.sap.com/
    Click on mySAP ERP
    Click on English
    The webpage goes to
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/e1/8e51341a06084de10000009b38f83b/frameset.htm
    It shows the status done but what I see is just a blank page
    I tried going to different areas of SAP Help files but no success
    I cannot even open Help on Help http://help.sap.com/saphelp_erp2004/helpdata/en/3f/a42938955df162e10000009b38f842/frameset.htm
    None of the other users have this issue

    Hi
    I am able to open your links. I think there is some problem in your internet explorer. please check
    regards
    Srinivas

  • Can not open certain pdf files in browser?

    I am having an issue opening pdf's that allow you to enter data and then submit them. I can open regular pdfs in my browser just fine. I have this issue in IE 7 and 8, firefox, and chrome. It is not browser specific.
    I have cleared my temp internet files. I have installed the latest version of reader. I have deselected Allow fast web view.
    Like I said, regular pdfs not an issue. The type where I can enter data just provide a blank screen.
    Your help would be appreciated.
    Thanks

    Adobe Reader isn't my favorite, but neither are smug and uninformed assertions about Preview. There are PDFs that render only squares and marks under Preview (http://apple.stackexchange.com/questions/24209/this-pdf-displays-with-question-m arks-instead-of-letters), which is a common problem in MS Windows Office generated PDFs, so you may actually need Adobe Reader for Mac.
    If you need to use Adobe Reader (as I do), then it may depend on the filesystem type where you save your PDF.  For example, our Macs are network homed.  Saving to desktop produced the error reported above no matter whether I used Safari:Save As, or the PDF save icon. 
    However, when I saved to a local drive (such as /tmp), then it worked.  I don't know why file system makes a difference, unless Adobe is doing something with extended attributes that doesn't get written correctly to some filesystems.
    Hope this helps.

  • Opening a .htm file in acrobat reader?

    I downloaded a adobe file from a site I trust and it shows the adobe logo and states I need adcrobat reader to open... so I download the most receint version of reader and then download the file when it downloads it shows the file as ".htm" and when I try to open theis file in acrobat it says it is the wrong file type or is corrupted.....
    how do I get this to open???
    p.s. not that I think of it I have not been able to open any files in acrobat reader in a very long time so I kind of quit useing it..... until now but could there be any other problem that causes this?

    It "could" be a dynamically generated PDF (one that doesn't exist until you click on the link) and something is wrong on their end. But Reader isn't causing it to become an .html file. Something on the site or with your browser is doing that.
    Again, it's hard to say without actually being able to go to that link. The image you posted doesn't tell us much other than you should be getting a PDF after clicking on that link.

  • Search Term Issues when passed as Parameters in Opening a PDF file in Browser (Updated)

    Hi everyone,
    I am wondering if there is a solution to the following issue.
    We are working with PDF files that have been OCRed (invisible text layer). We use a search engine to search the PDFs for terms. We then pass the search terms as a parameter to the PDF when we are opening it in Acrobat or Reader in the browser. It brings up a list of instances and the context in which it is found -- much like the native search function -- but it is not possible to only search for the exact phrase when it is passed as a variable..
    In some cases, what we see are two lists -- so it has the filename with a list underneath that is expanded showing search results, and then a second instance of the file name after that list, but it is collapsed.
    Is there a way to just have one list or both lists expanded at the same time?
    Also, is there a way to ensure that it shows instances where more search keywords are found at the top of the list.
    For example, if we pass the search phrase "wanted to buy a car" it might show instances of "to" at the top of the list, but later on in the collapsed list it might show instances of "buy a car".  Again, is it possible to prioritize the results, or at the very least, expand everything? I am not sure what else we can try.
    thank you,
    Jeremy
    Follow up: I should note that some times the two lists appear to be the same or similar terms found twice. At the top it would say 2 documents with n instances (where n is the number of instances). I have noticed this when the search keyword count goes up.
    Follow up #2: It appears that this occurs more often when using more than 2 keywords, but I have seen it happen with only 2 words.

    There were documents available in the knowledgeable that I no longer have the urls for. I have had communication with Adobe Acrobat support personnel that have made the same statements. I do not have the habit  of asking official Adobe tech support people to prove their statements by providing documentation. I have also seen Adobe employees give presentations on computers that have had both installed. When they were asked about the incompatibility, they did say the equivalent of phooey. However, enough people on this forum have had their problems disappear when they have removed one of the two programs that I feel comfortable giving that advice. Yes some people have no problems running both until one of the programs or a system component gets updated and then things stop working. My advice is not to have both on the same computer. When two programs share system calls and can fight over who gets to handle the call it makes sense that it can cause a problem. It doesn't make a difference if it is Reader and Acrobat or any two other programs you run. If you are not having a problem with running both GREAT. However, if you are running both and have a problem, it is a simple step to eliminate one and see if the problem disappears.

  • Cannot open welcome.htm file - operation aborted

    I have a user using Contribute CS5. When she launches Contribute directly, she gets the following error message:
    Internet Explorer cannot open the internet site:
    file:///c:/documents/Documents and Settings........Contribute CS5/en_US/Configuration/Content/CCWelcome/welcome.htm (I can send full path if needed)
    Operation aborted.
    She has one connection set up to a Website and I have it set to automatically connect at startup.
    Any thoughts as to why this happens or a workaround to get rid of it?
    Thanks - Lainie

    this forum is for web development, so if the web site in question is not written by yourself your question is off-topic here.
    if you need help in using Windows, visit answers.microsoft.com. 
    Visual C++ MVP

  • How do I open an htm file with Firefox 3.6.14?

    I have downloaded a photo with file extension htm. It suggests only Firefox. When I double click on the download it just opens a Facebook page which I can't open it from

    Did you make sure by checking the Properties via the right-click context menu that the file didn't end up with a name like image.jpg.html because Windows was hiding the file extension and kept the original .html file extension?

  • I would like to open an .htm file from the command line using firefox. Firefox responds by trying to open a URL (adding WWW to front of file name)

    firefox is located on unix box and I would like to use it to open report generated. After script creats report I would like to call firefox to read report. "firefox report.htm"

    I have solved this problem. All I needed was to follow firefox with the filename

  • Firefox is opening all .htm files, even those that are intended to be opened with a certain program

    I do have a .chm reader add-on installed, but I don't think that is the problem

    Oh yeah, I should say, I get messages on the console like:
    2/7/09 4:57:12 PM iPhoto[748] com.apple.console have info and image but no ref
    2/7/09 4:57:12 PM iPhoto[748] com.apple.console have info and image but no ref
    2/7/09 5:01:28 PM iPhoto[748] com.apple.console unreadable file: slides-Scan-090206-0023.jpg
    Yet, as I say, I can crop the file fine in Preview and resave, then I can edit it in iPhoto.

  • Project HTM Files are Blurry when opened in Web Browser

    Hello, I'm hoping someone on this discussion board can help me!
    I have created a video project for work in Adobe Captivate 6 and have published it. I now need to upload this video project onto our company's website.
    In short, here is my problem: When I open the HTM file for my video project from the original file source, it appears normal. However, once I wrote a path to the HTM file in our website's HTML code and went to open the page in my internet browser (I've been using Firefox) the video appears blurry.
    How can this be? Clearly the quality of the HTM file is fine, since it was not blurry when I opened it from the original file source. Can anyone think of a reason why it is blurry when opened in an internet browser? I know this sometimes can happen with the SWF files because internet browsers can alter their dimensions, but I thought using HTM files was supposed to help in avoiding these sorts of problems.
    Any help at all would be appreciated. Thanks!

    Sure.
    Here is a screenshot from one of the older videos:
    And here is a screenshot from my video:
    They are essentially the same screen, but for some reason in my version everything looks far more pixelated. Any thoughts on this?

  • RoboHelp HTML 9.0.2.271 crashes when opening .htm files

    Hello. I'm using RoboHelp HTML 9.0.2.271. When opening a certain RH project (I have three that I access regularly), the project opens fine, but when I try to open any of the topic files, RH hangs/crashes. I can perform any other tasks in the project (generating, publishing, updating the browse sequence, etc.), but I can't open any .htm files. In trying to fix this problem, I have:
    Updated from 9.0 to first 9.0.1 then 9.0.2
    Renamed the .cpd file
    Imported one of the topics in the crashing project to a project that isn't crashing
    Updating and renaming the .cpd file didn't work and importing the topic into a healthy project allowed the topic to open (so the topic doesn't seem corrupt).

    Also using 9.0.2.271, I had exactly the same problem: open project, double-click a topic in the Topic List pane... crash.
    However, immediately after opening the project I had Windows 7's blue 'busy' doughnut symbol constantly flashing under the mouse pointer. This is described (for RH8) in Peter Grainge's description on his excellent website (RoboHelp > Opening RoboHelp Projects). The same topic mentions the .hhp file, so I checked the contents of mine...
    At the very end, in the [MERGE FILES] section, it listed two other .chm files; one which was supposed to be there, and one which was not (Dummy.chm). I had merged Dummy.chm only during the early testing stages of my project, and had long since removed all references to it from my project. I have no idea why it was still listed in the .hhp file.
    I deleted the reference to Dummy.chm from the .hhp file and regenerated the project... and Dummy.chm reappeared in the .hhp file!  After deep-searching my project files using NotePad++, one remaining reference to Dummy.chm was also listed in the .xpj file:
      <file>
       <name>Dummy.chm</name>
       <comments></comments>
      </file>
    So I manually removed those lines and saved the .xpj using NotePad++, reopened the project using RoboHelp, and regenerated. The rogue reference to Dummy.chm is now gone. I have opened, saved, and closed the project several times and it now seems to be reliable.
    Probable cause of bug: I had recently performed a cleanup of my project folder and deleted Dummy.chm, but unknown to me I suspect RoboHelp was still looking for it when opening the project, hence the permanent 'busy' doughnut and the crash when trying to do anything else, like opening a topic.

  • Today firefox didn't open .htm file saved in my computer how to solved the issue? yesterday opened perfectly yet today not opened .htm file why?

    IN BANK WEBSITE TAX PAID PAGES SAVED IN MY COMPUTER AS .HTM file format since yesterday firefox, chrome opened this files perfectly. yet today i have not open this type of files. open the .htm file firefox opened in home page only.

    If you drag and drop the .htm file on page currently displayed in a Firefox tab, does it display correctly?
    If so, this implies that there is a problem passing the file name to Firefox, either a problem with the registry settings created whenever you make Firefox your default browser, or an issue with how Firefox is starting up.
    Assuming you still have Google Chrome installed, could you do a double-switch of your default browser:
    # Have Google Chrome make itself the default browser (see [https://support.google.com/chrome/answer/95417?hl=en Make Chrome your default browser - Chrome Help])<br><br>
    # Have Firefox make itself the default browser again (see [[How to make web links open in Firefox by default]])
    Any improvement?

  • Cannot "open with" a htm file with dreamweaver :((

    As the title states, I am trying to open my htm files with
    dreamweaver, which should work as it worked before on another
    computer. However, already when I installed dreamweaver on this
    computer I got a message saying that my computer is a little
    retarded, as although it's windows xp it does not have the latest
    update or whatever.
    But anyhow, I don't see how this has something to do with my
    problem (but maybe you do?) : If I right-click on the htm file and
    then click "open with", dreamweaver is not listed as a program at
    all. If I click browse and search for it manually, mark it &
    click "ok" it still opens the file with internet explorer.... grr
    Did anyone have this problem before? Is there a way to fix
    it? Please, I'm very desperate here and your help is very very
    welcome!
    Thanks a lot!

    is this file you want to open a local site folder?
    open dreamweaver.
    dw menu->site->manage sites
    define a new site to the folder that contains this file.
    then open the file from the dw Files Panel
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

Maybe you are looking for

  • How do you upgrade from Mac OS x 10.6.8 to Lion?

    How do you upgrade from Mac OS x 10.6.8 to Lion?

  • How can I get the ID number of an attribute, based on the name string?

    In an IVI driver, how can I get the list of attributes of an instrument? Is there a way to retrieve the long type representation of an attribute ID, based on the string name? Say, I put "IVIDMM_ATTR_FUNCTION", and I receive the long number (i.e. 1150

  • DROID X SELF REBOOTING?????

    Ok, I got my new Droid X on September 9th and since I've had it the phone seems to reboot itself 3-4 times a day without reason.  I call verizon to tell them the problem and i get "its news to us"...Strange as I read several forums about many people

  • Can't start messaging service

    I am not able to start my messaging server this is what i get when i do ./start-msg01 # ./start-msg /usr/iplanet/server5: POP3 daemon process already running: 756 /usr/iplanet/server5: IMAP4 daemon process already running: 770 /usr/iplanet/server5: H

  • Instantiating member classes using reflection

    I have checked through this forum but if the answer to this question is here I missed it. I am trying to find out how to invoke the appropriate instantiation / constructor call to create an instance of a member class. The following works finepublic c