How to open a html file from hard disk

Hello everyone,
i want to display a html file by using java applet.
This is my current coding:
package mkbe.pg;
import java.net.*;
import java.applet.*;
public class HtmlReader extends Applet 
URL userUrl;
public void start()
try{
userUrl = new URL(getDocumentBase(),"FILE:///c://2007/index.htm");
}catch(MalformedURLException error){
System.out.println("Error");
getAppletContext().showDocument(userUrl,"_blank");
}the program have no error and warning and the applet did run by appletviewer but the html file did'nt open.
Is it there's mistake in my coding?
If there is please tell me how to repair it.
Thanks

For an applet to read from a client's harddrive it will need permission.
This can be done by putting the applet in a jar file and signing it,
or by using the poiclytool to change the java.policy file to give FilePermission.

Similar Messages

  • How to recovery the deleted files from hard disk like images,media files

    How to recovery the deleted files from hard disk like images, media files by using c#.net

    It's important to define deleted and recovery. You can recover file from the recycle bin using the Win API. Here's an
    example in C/C++. You need to
    pinvoke SHFileOperation.

  • How to open Adobe Reader file from another native IOS application?

    There is an existing thread, but I want to re-open it because I think this is an important feature that we need badly.  I was wondering if there is any plan to add this feature so we can open PDFs directly into Adobe from the web / other apps.
    How to open Adobe Reader file from another native IOS application?
    Basically, we just want to use a custom URL scheme to open a specific document in the App.  Currently, this only opens the app but does not load the file.
    APB

    Not to hijack the conversation but I can explain why this would be useful for both the above case and another.
    What I believe Pavel is talking about is setting up a "URL Scheme" for the Adobe Acrobat iOS application so that you can easily open a PDF specifically in Adobe Acrobat iOS from other native applications and even from web applications opened within Safari. This is particularly useful if your application requires some of the specific features in Adobe Reader iOS to grant them the best experience possible and you want to encourage this.
    Another case: If you're using Adobe Livecycle's document security modules (that encrypts PDF files so that Adobe Acrobat must "phone home" to decrypt and view the document), these PDF's can only be viewed inside the Adobe Acrobat application and appear as blank in most other PDF readers. Having a URL scheme allows your application utilising this functionality to have a 1 click step to view the PDF rather than the current non-user friendly process:
    - Within Safari, touch the PDF link (appears as blank in the default Safari PDF reader, which in itself is confusing)
      - Touch "Open in..."
      - Touch "Adobe Acrobat"
    We have an immediate need for this functionality for the example above. I can resubmit it in a separate post if necessary.

  • 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.

  • Copy a file from hard disk to a jar

    Is there any way to copy a file from hard disk to a jar file?

    hajani wrote:
    No, I want to copy a file into an other jar file (like a zip or a rar file)
    Edited by: hajani on Dec 7, 2008 4:11 AMIf you really do mean 'jar' file an not 'zip' or 'rar' then you can use class java.util.jar.JarFile and write your own code. If you don't feel like writing a load of code then and you can guarantee that the 'jar' executable is going to be available then you could use Runtime.exec() or it's cousin ProcessBuilder. If you mean a 'zip' file then you could use class java.util.zip.ZipFile and write a load of code. If you mean a 'rar' file then you will either have to find a 'rar' class library or again use Runtime.exec().

  • How to open a local file from javascript in a jsp-page

    Hi
    I have created an iview from a PAR file. In the par file I have a jsp-page with some javascript code. From the javascript coe I want to open a new window with an Excel file.
    I have tried window.open("c:
    test.xls", "test_window"), but it doesn't seem to work. I have created a small HTML page locally with the same command and there a new window opens with the Excel file.
    If I change the local file path with an URL it also works.
    Any idea how to open a local file ?
    Thanks
    /Jakob

    Jacob,
    I'm not 100% (but 99,9%) and it has to do with security ristrictions of the browser not allowing to have local workstation interation from the web. This is ofcourse very dangerous if the browser would allow it... So therfore it is blocked. What if somone would point to a file/executable that formats your drive so for that reason it is not allowed to have web interaction with a local file. Only with Java Applets this is possible but still with many limitations, and what I remember Google Gears and Adobe Air do have some limited web 2 local file interaction... So best and most simple solution you are left with is pointing to a url instead of a file on a c:\ drive.
    PS The reason why it works when you start the html from your local PC has todo with the fact that the browser detects that the html is not running in the web at that moment therefor allowing the access.
    Cheers,
    Benjamin Houttuin

  • Open an HTML file from a SAP Report

    Hi all!
    I would like to open an HTML file, that`s in a local directory of my PC, from a SAP Report.
    It is an alv list, where I have added a pushbotton. And I would like to code the utility of open a local html file, when someone push it.
    Anybody knows if it is possible?
    Thx

    Here is some sample code.
    report zrich_0002.
    call method cl_gui_frontend_services=>execute
      EXPORTING
        DOCUMENT               = 'C:test.html'
    *    APPLICATION            =
    *    PARAMETER              =
    *    DEFAULT_DIRECTORY      =
    *    MAXIMIZED              =
    *    MINIMIZED              =
    *    SYNCHRONOUS            =
    *  EXCEPTIONS
    *    CNTL_ERROR             = 1
    *    ERROR_NO_GUI           = 2
    *    BAD_PARAMETER          = 3
    *    FILE_NOT_FOUND         = 4
    *    PATH_NOT_FOUND         = 5
    *    FILE_EXTENSION_UNKNOWN = 6
    *    ERROR_EXECUTE_FAILED   = 7
    *    others                 = 8
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Please remember to award points accordingly and mark this post as solved when you problem is solved.  Thanks.
    Also, Welcome to SDN!!
    Regards,
    Rich Heilman

  • How to open an InDesign file from CMIS repository?

    We are using CS SDK 2.0 , looking to use CMIS to keep versionning of .indd file. The uss case as following:
    form our de4veloped InDesign pluging, user click a button
    the button will open a .indd file from cmis repository
    plugin check-out the file, open it within InDesign IDE
    user make changes
    user make save
    the plugin export a pdf and swf files from the current document, if the files exists it will update, aslo on CMIS repo to keep also versions of exported pdf and swf, if files not exist in first time .. it will create
    when user clos the document , it will check it in.
    the problem there is no sufficent sample code for, even was thinking to use Adobe Drive, but there is no Adobe Drive SDK for Flex.
    i used to fuse the sdk, but
    private function getFileByPath(sPath:String):Fileable {
    appStatus = ">> get File By Path";
    message = "";
    viewEnabled = false;
    var request:GetObjectByPathRequest = new GetObjectByPathRequest(session);
    var oFileable:Fileable;
    request.path = sPath;
    request.execute(onSuccess, onError);
    function onSuccess (event:GetObjectByPathResponse) : void {
    oFileable = event.object;
    //var oDoc2:Document = new Document(event.object);
    doc = event.object as Document ;
    //children = new ArrayCollection(vectorToArray(event.target));
    appStatus = ">> getFileByPath : Success";
    viewEnabled = true;
    return oFileable;
    private function checkOutFile(oFile:Document):Document{
    appStatus = ">> Check Out File";
    message = "";
    viewEnabled = false;
    var request:CheckoutRequest = new CheckoutRequest(session);
    request.object = doc;
    var oDocument:Document;
    request.execute(onSuccess, onError);
    function onSuccess (event:CheckoutResponse) : void {
    oDocument = event.object ;
    appStatus = ">> Check Out File : Success";
    viewEnabled = true;
    return oDocument;
    private function openTestFile():void {
                                            appStatus = "Open Test File";
                                            message = "";
                                            viewEnabled = false;
                                            var oFile:Fileable  = getFileByPath("/Collaboration/test.indd");
                                            //var oDoc2:Document = new Document(oFile);
                                            var oDoc:Document  = checkOutFile(doc);
    i do not know what method in the CS SDK to open document fom active window and  how to map CMIS Document to com.adobe.indesign Document ?

    Dear Seoras
    i fixed the to return the cmis path:
    public function resolveRemotePath(file:File):String
                                  if (file.nativePath.indexOf(LOCAL_FILE_CACHE.nativePath) != 0)
                                            return null;
                                  var remoptePath:String =file.nativePath.substr(LOCAL_FILE_CACHE.nativePath.length);
                                  trace("resolveRemotePath [11] : "+ remoptePath);
                                  if(File.separator!="/") {
                                            //var pattern:RegExp = /(\/)/g;
                                            var pattern:RegExp = /(\\)/g;
                                            remoptePath =  remoptePath.replace(pattern ,"/");
                                            trace("resolveRemotePath [22] : "+ remoptePath);
                                  return remoptePath;
    i have another issue, why everytime update the generated pdf it creates new pdf file with same name in the cmis repo .. does the pdf is not updatable over the cmis service ???
    Regards

  • 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.

  • Cannot delete files from hard disk (after deleting from playlists)!

    all of a sudden itunes stopped allowing me to automatically delete (with the warning) a downloaded podcast so I would have to go to the hard disk manually to delte the posdcast.
    How do I get the system back to what it was where I delete a podcast and then get the warning and say ok to delete from hard disk?
    TIA!

    Hi Chris:
    2 part response:
    I founf the problem--somehow my itunes folder was moved to a different part of my hard drive--once I moved it back I can delete.
    I can delete as follows: when I right click and click on delete, I first delete the file from itunes library--then I get prompted if I want to delete from my hard disk by sending file to recycle bin--There is also a prompt if I do not want to see the warning--which I have on as a safety precaution. So I bet the default could remove from playlist and send file to recycle bin in one move.

  • How do I open an HTML file from my hard drive?

    Hello FireFox,
    I develop applications in JavaScript and need to test them in the three major
    browsers including FireFox. In the older version one would click on the FireFox logo and
    go to New Page (New Tab?) and then File. Recently downloaded FireFox 30.0 and there
    does not seem to be New Page option. I see New Window but it does not give me an option
    for opening a file from the hard drive.
    Thanks
    Allen in Dallas

    Hi!
    There are a few ways to open files in Firefox. The easiest is '''CTRL''' + '''O'''. Another easy option is to click Menu > Open File (if it's not there, you'll have to enter the Customize menu to drag it in).
    <hr>
    Happy coding!

  • How to recover Deleted file from HARD DISK

    By mistake my entire AVCHD file of 90 Mts  duration was deleted from my Hard Disk, this  I realised after a week., in the meantime I have not added or deleted any file from this hard Disk. I had given my this hard disk to my service engineer to recover the video., he has tried and recover some 40 mb file., but I cant open this recovered video file in Premiere or any other video convertor programme., also I cant get any information about Video.
    Can anybody in the forum help me and suggest how to recover my deleted Video from the Hard disk

    Hi, hard disk data loss is actually a hard task for many users 'cause most of them think this kind of problems is a complicated situation. Here are some tips you need to know after data loss happened.
    1. If you meet the file loss situation, keep calm and stop using your computer to do any read or write operation until you find the way to recover the lost files because any wrong operation.
    2. If you've lost a file, time is of the essence. As new files saved to Mac hard drive or storage devices, the original files gets overwritten. So do not use the drive or disk which your deleted files are stored before at all, until you have completed the scanning and recovery process.
    3. The system crashed or the files loss situation happens occasionally, so remember build a backup for the files periodically is strongly needed.
    4. If you meet the file loss situation again, stop using the Mac or storage device right now, use another computer to process the files recovery.
    5. Remember this, no matter at the normal time or after files recovery, build a backup for the files periodically is the best method to protect your files from data loss situation.
    This post offers you more tips you may need: http://www.uflysoft.com/data-recovery-mac/mac-files-recovery.html

  • How to generate individual HTML files from linked help?

    Hi folks,
    I'm trying to figure out how to generate individual web pages - based on heading types - from a help project this is linked to a FrameMaker book.
    I'm linking to the FM book, rather than importing, because the import process ruins my graphics. So, I know how to create individual web help pages using the import process; but that's not an option for me. (The graphics issue is a whole other discussion, which I've since given up on.)
    So, I'm using TCS 3.5 (RH9 and FM10). I've successfully linked to the FM book. Each topic represents a complete chapter and includes a single Heading 1 for the title and several Heading 2's. Again, these are all in the same help topic because I'm linked to the FM book.
    What I want to do is generate the web help so that new web pages (files) are created. In other words, I want breaks before each Heading 2. I want the resulting web pages to be named based on the Heading 2.
    Is this possible?
    Thanks for reading,
    Tom

    I’m not sure I understand the problem (I’m using FM 10, RH9, TCS3):  You can adjust .isf and all Conversion/CSS mapping, etc settings for an existing project (Linked or Imported) at:
    File > Project Settings > FrameMaker Document > Edit Conversion settings for FrameMaker documents: (click Edit button).
    Then, Go to FrameMaker Settings > Paragraph > Heading 1 etc. and click the box for Pagination.
    What I don’t know is if you have to re-do your linking process from scratch to do your pagination settings right the first time (like create a new project with your Frame docs, which shouldn’t be hard to test if you have saved your CSS, Master Pages etc), or already have an .isf file  with proper settings that you can specify at time of first import/linking. I already had these in place when I set up my linked project of a Frame book with 13 chapters – 350 pages – resulting in over 300 separate HTML files/topics (set H1, H2, and H3 levels to paginate). I don’t know if you can change these things post-linking, but it can definitely be done!
    There is definitely no reason to have to have an entire FM chapter as one topic in RH. You may have to create a new project to achieve your desired results, I am not sure.
    I hope this is helpful. Regarding RH ruining your images, I know what you mean. Through a painstaking process of research, trial, and error, I found that these Image options in the Conversion Settings produced the best results for me, though not as good as “ideal:”
    ·         Check the box for “Use Distiller to Generate Image”
    ·         Leave the “Do Not Regenerate Images” and “Preserve 3D Images” boxes unchecked
    ·         Under Preferred Dimensions: Check “Maintain Aspect Ratio” and check Width and Height – Set both to 0pt. (*This one was a key tip.) Leave “Scale” unchecked. (Scaling seems to do terrible things in RH.)
    ·         I left the Max Dimensions settings unchecked.
    ·         Set my personal preferences for margins (2pt all sides) and borders (solid, gray, 1 pt)
    ·         Under Advanced, Default format of PNG with color bit depth of 24. My graphics are all screenshots, so this is the reason for this in my instance.
    Regards,
    Virginia

  • How to generate a html file from a xml file with the default Firefox look and feel

    Hello
    Any xml or xsd file are pretty printed with Mozilla firefox. I would like to generate the equivalent html file, in order to introduce it later in a Word document. Do you use a xslt file ? How can I do this ?
    Best regards

    I would be remiss if I did not point out that the forum software detected your Firefox as version 17. Is that correct?
    Version 17 is not secure; Mozilla discloses [https://www.mozilla.org/security/known-vulnerabilities/firefox.html security flaws] after each new release. Is something holding you back from upgrading to Firefox 31? Please let us know so we can suggest solutions or workarounds.
    If Help > About Firefox shows Firefox 31, you may need to clear the preference that is misreporting your version number. See: [[Websites say that Firefox is outdated or incompatible even though it's the latest version]].

  • How to open a BUP file from a flashdrive in Macbookair?

    Pl let me know how to view a video with BUP extension from a flashdrive in my macbookair?

    You can open a PUB file ONLY with MS Publisher (Windows). No other possibility.

Maybe you are looking for