A function can not be used in Applet.what's wrong?

Here is a function.
private String LoadFile() {
String input;
String output="sssssdsdsddf";
try{
FileReader f=new FileReader("shu.txt");
BufferedReader in = new BufferedReader(f);
while ((input = in.readLine())!= null){output=output+input;}
in.close();
}catch(IOException e) {
System.err.println("Exception caught: " + e.getMessage());
return output;
It can be used in Java Application,and work well.but can not be used in Applet,it does not work.what's wrong?

http://www.javaworld.com/javaworld/jw-12-2000/jw-1215-security.html#sidebar1

Similar Messages

  • A function can not be used in Applet.what' wrong?

    Here is a function.
              private String LoadFile() {
    String input;
              String output="sssssdsdsddf";
              try{
              FileReader f=new FileReader("shu.txt");
    BufferedReader in = new BufferedReader(f);
    while ((input = in.readLine())!= null){output=output+input;}
              in.close();
              }catch(IOException e) {   
                   System.err.println("Exception caught: " + e.getMessage());
    return output;
    It can be used in Java Application,and work well.but can not be used in Applet,it does not work.what's wrong?

    Don't you think it would be a bit of a security risk if any applet you downloaded from the web (unknowingly) could read/write to your file system....
    Applets have strict security applied to them, and file i/o is one of the restrictions. There are ways around it, but for the moment I'd suggest you build a bridge and get over it.
    Cheers,
    Radish21

  • I can log into my iTunes account but can not access my account details, what's wrong?

    I'm starting a new discussion here even though there is really nothing new to add to this discussion:
    https://discussions.apple.com/thread/3572699?start=0&tstart=0
    I can sign in to iTunes with my apple ID no problem. However when I click account from the drop down menu (by my ID in the right hand corner of the iTunes screen) I get a sign in window in which my ID is filled in but it wants my password which I duly fill in . At this point the window just keeps coming back up for me to fill in. If I fill my password in wrongly I get red text telling me so.
    So basically I can't view my account details even though I'm clearly logged in. I'm increasingly worried because If I can't access my iTunes account data how do I know my credit card is not being used by someone else?
    I'm guessing it's a problem specific to my machine (MBP running up to date Lion) I'm wondering if it could be connected to the safari cookie problem that affects other issues with pop up windows as documented (and solved) here:
    https://discussions.apple.com/thread/3502463?start=45&tstart=0
    Only I don't have that problem any more!
    Help would be very much appreciated.

    Problem solved!
    I started to suspect that the problem was with my computer rather than the apple servers.
    Reparing disc permissions from Disc Utility seemed like an obvious thing to try but I thought I had done this without it working. However on OSX daily  I read..."In mac OSX Lion repairing permissions from the Disk Utility app doesn’t repair the users file permissions"! Hmm nice one Apple- reparing permissions does not repair permissions! It seems that you have to use disc utility from recovery mode.
    I then followed these instructions on OSX daily (dot com)
    Repairing a Mac Boot Disk with Disk Utility & OS X Lion
    Reboot the Mac and hold down Command+R  (To boot into recovery)
    Select “Recovery HD” at the boot menu
    At the Mac OS X Utilities screen, select “Disk Utility”
    Select the boot volume or partition from the left menu and click on the “Repair” tab
    Repair Disk is now possible, click on “Repair Disk” to repair the boot volume
    Now verify disk permissions and repair them
    This solved the problem for me
    Hope it helps......
    Am I allowed to award myself a greenie? Well I'm going to anyway because it was a pile of work getting to the bottom of this and I hope it helps others.

  • When trying to send an email I can not access "insert addresses" link, what is wrong?

    I am using Windows XP and when trying to send an email using Yahoo email I can not insert address from that link. It will not open. I can not find a way to solve this. Help. Thanks

    See this:
    [http://support.mozilla.com/en-US/kb/Changing+the+e-mail+program+used+by+Firefox]

  • TS3276 I can login perfectly to my hotmail account but can not see the contents.  What is wrong?

    I have more than one mail account.  All of them are working except hotmail.  Everything seems to be logged correctly.  Even checked with "connection doctor".  I can not see the contents of the hotmail account.  What could be wrong?

    When you read the ebooks on your iPad (with you logged in using your Acrobat account), did you explicitly save those files to Acrobat.com? Are you able to access those same files in browser?

  • I can not file my E-mails, what is wrong?

    Dear sir/madam,
    When I want to file an E-mail I get the following message:
    Warning! It is not succeded to file this message. Check your filename and try later.
    This is strange. I use thunderbird for many years. My imporant E-mails I always file in the directory of my client. E.g. the directory Smith: the E-mail wil be filed as: 01) 18-aug-14 Confermation order
    Recently I upgraded my computer from Ubuntu 12.01 to 14.04.
    Mayby there is the problem, I dont't know.
    I hope someone can help me out.
    Thank you beforehand.
    Kindly Regards
    Gerlof Brinck.

    file name conventions - located this info:
    http://www.cyberciti.biz/faq/linuxunix-rules-for-naming-file-and-directory-names/
    http://linuxg.net/the-7-main-rules-for-naming-files-and-folders-in-linux-and-unix/
    http://linuxg.net/escaping-special-characters-in-linux-and-unix-with-7-practical-examples/
    01) 18-aug-14 Confermation order
    could it be the ')' part of the filename or the spaces

  • I just bought a new 4s and I can't activate using cellular connection, what is wrong?

    I just bought a new 4s and I can't activate it using cellular connection and Wi-Fi and also I can't seem to get the iTunes connection option from my phone as well. What can I do?

    posted in error.
    Message was edited by: Radiation Mac

  • IOS Cangjie input method can not be used. Original with Space Bar word selection function is invalid, as soon as possible to solve, it will affect the most users in Taiwan and Hong Kong.

    iOS Cangjie input method can not be used. Original with Space Bar word selection function is invalid, as soon as possible to solve, it will affect the most users in Taiwan and Hong Kong.

    No PR1.2 Firmware update, No update for Nokia Messaging, No updates for Ovi Maps .... Why is the N900 the forgotten stepchild ?
    "PR1.2 is still being tested - http://twitter.com/luovanto/statuses/13087245356"
    Hong Kong Launch http://www.youtube.com/watch?v=pY8zCBzvQLo

  • How does one know whether or not they use "Java applets"?

    The support doc for the recent Java update (Update 8, for Snow Leopard), entitled "About Java for Mac OS X 10.6 Update 8," advises the following:
    If you do not use Java applets, it is recommended that you disable the Java web plug-in in your web browser.
    How does one know whether or not they use "Java applets"?
    Thanks.
    URL:  http://support.apple.com/kb/HT5243

    K.S. wrote:
    dymar wrote:
    Also, how would I know that a missing applet was causing some feature(s) not to work in a situation where no error mesage was returned?
    Sometimes you have to dig to find out: http://earthnow.usgs.gov/earthnow_app.html
    doesn't tell you directly, but it is mentioned in the FAQ that Java is required. If the content is appropriate, you can always ask here.
    Thanks.  According to that webpage, my "Java is out of date."  When an error message like that is returned, I guess it's clear that "it's a Java problem."  Presumably, one would then just go to java.com and download the applet if he/she wanted to view the webpage.
    I was wondering more about situation when unexplained problems that involved missing Java applets weren't noted in error messages.
    But maybe I'm worrying about something that doesn't really need to be worried about.

  • HT201335 when using apple tv with my ipad, the mirroring function does not work, screen goes black, what is the issue?

    when using apple tv with my ipad, the mirroring function does not work, screen goes black, what is the issue?  My son's Ipad(same as kind as mine) works ok with the apple tv but mine does not.  Any suggestions?

    Hello Nina Izurin,
    While written for the iPhone, the troubleshooting below can help resolve issues with your iPad's camera, as well.
    Camera isn't functioning or has undesired image quality
    If the screen shows a closed lens or black image, force quit the Camera app.
    If you do not see the Camera app on the Home screen, try searching for it in Spotlight. If the camera does not show up in the search, check to make sure that Restrictions are not turned on by tappingSettings > General > Restrictions.
    Ensure the camera lens is clean and free from any obstructions. Use a microfiber polishing cloth to clean the lens.
    Cases can interfere with the camera and the flash. Try gently cleaning the lens with a clean dry cloth or removing the case if you see image or color-quality issues with photos.
    Try turning iPhone off and then back on.
    Tap to focus the camera on the subject. The image may pulse or briefly go in and out of focus as it adjusts.
    Try to remain steady while focusing:
    Still images: Remain steady while taking the picture. If you move too far in any direction, the camera automatically refocuses to the center.
    Note: If you take a picture with iPhone turned sideways, it is automatically saved in landscape orientation.
    Video: Adjust focus before you begin recording. You can also tap to readjust focus while recording. Exiting the Camera application while recording will stop recording and will save the video to the Camera Roll.
    Note: Video-recording features are not available on original iPhone or iPhone 3G.
    If your iPhone has a front and rear camera, try switching between them to verify if the issue persists on both.
    My issue is still not resolved. What do I do next?
    Contact Apple Support.
    iPhone: Hardware troubleshooting
    http://support.apple.com/kb/TS2802
    Cheers,
    Allen

  • Cant open PDF files..It says the adobe acrobat reader that is running can not be used to view files in a browser..plz suggest the solution.thanks

    Whenever i try to open a PDF file it says " The adobe/acrobar reader that is running can not be used to view files in a web browser. Plz exit adobe/acrobat readerand exit your web browser and try again." Wt do i need to do, plz suggest.
    Regards
    Aditya Bhargava

    Hi adityabhargava01-
    My first suggestion is to upgrade to the most recent version of Firefox by going to this link:
    http://www.mozilla.org/en-US/firefox/new/
    My second suggestion is to read this article on how to many your preferences on how Firefox deals with PDFs and all other file types:
    [[Options window - Applications panel]]
    I hope that helps!

  • AdobeAcrobat/Reader that is running can not be used to view PDF Files in Web Browser...what do I need to do to fix this..

    I just got Windows 7 and have been having problems since loading it. Most of my drivers only go to Vista and don't recognize 7.
    I have trying to download some manuals from their website
    and keep getting this message; Adobe Acrobat/reader that is running can not be used to view PDF files in Web Browser.

    Could I suggest a workaround for PDFs until a solution is posted? Open them directly in the Adobe application rather than in a browser tab.
    In your Adobe application(s), go to:
    Edit > Preferences > Internet
    Then uncheck "Display PDF in browser"
    (There are very few sites where having PDF integrated is really beneficial.)

  • Chrome - Adobe-Acrobat/Reader can not be used to view PDF files in a web browser.

    I can't view PDF files via Chrome (it works on Internet Explorer but I prefer Chrome)  -  the error below has arisen recently on Chrome, though I can't see what has changed.
    "Acrobat plug-in
    The Adobe-Acrobat/Reader that is running can not be used to view PDF files in a web browser. Please exit  Adobe Acrobat/Reader and exit your Web Browser and try again."
    I have looked through Forum articles on similar errors and have tried the following(text copied from other Forum entries)
    Repair Adobe Acrobat (from Acrobat)
    Repair Adobe Acrobat (from Control Panel
    Configure Acrobat  as a helper application: Choose Edit > Preferences., Select Internet on the left., Deselect Display PDF In Browser Using [Acrobat application], and then click OK.Quit Acrobat or Reader
    Create a registry item for Acrobat: with Regedit: If the registry item doesn't exist on the system, do the following: Go to Edit > New > Key and create the missing HKEY_CLASSES_ROOT\Software\Adobe\Acrobat\Exe.Go to Edit > New > String Value and name this key (Default).Select (Default), and then go to Edit > Modify. Type the Adobe Acrobat path in the "Value data" for your product.,restart your computer
    Repair the HKCR\AcroExch.Document registry key: Navigate to HKEY_CLASSES_ROOT\AcroExch.Document., Right-click AcroExch.Document and select Delete; make sure that you have the correct key, and click Yes on any prompts, Right-click AcroExch.Document.7 and select Delete; make sure that you have the correct key, and click Yes on any prompts. Repair your Acrobat  installation
    None has solved the problem. However it still works ok with IE. But I want to stick with Chrome because I find IE is so slow!
    I am using Vista, with Adobe Acrobat standard 9.5.2 and Google Chrome version 23.0.1271.64 m which is marked on Chrome as 'up to date'
    Does anyone know why I might be getting this error on Chrome but not IE?

    I think I have discovered the answer to my own question!
    I have disabled Adobe Reader plug-in, and can now see PDFs in Chrome.
    (Steps: Chrome Menu, Settings option, Click Advanced Settings link, then Content Settings button, then select Disable Individual Plug-Ins, and a list of plug-ins is offered to enable or disable).
    I then get a different result depending on whether or not Chrome PDF viewer is enabled - with it enabled I see the PDF document in Chrome, or with it disabled then the option is offered to download it, but either way I can get it it via Chrome without having to run Internet explorer in another browser window.

  • Reader 9.2 - "can not be used to view PDF files in a web browser"

    Hello,
    I recently deployed Adobe 9.2 within our organization. I used the Adobe Customization Wizard 9 to transform the install set, and selected the "Display PDF in Browser" option as default.
    When opening a PDF linked from a web URL, we get the message: "The Adobe Acrobat/Reader that is running can not be used to view PDF files in a Web Browser. Adobe Acrobat/Reader version 8 or 9 is required. Please exit and try again." This occurs under IE8 and IE6, in both Windows XP SP2 and Windows 7.
    If I launch Adobe Reader and unselect "Display PDF in Browser" in preferences, PDFs open normally.

    I think I have discovered the answer to my own question!
    I have disabled Adobe Reader plug-in, and can now see PDFs in Chrome.
    (Steps: Chrome Menu, Settings option, Click Advanced Settings link, then Content Settings button, then select Disable Individual Plug-Ins, and a list of plug-ins is offered to enable or disable).
    I then get a different result depending on whether or not Chrome PDF viewer is enabled - with it enabled I see the PDF document in Chrome, or with it disabled then the option is offered to download it, but either way I can get it it via Chrome without having to run Internet explorer in another browser window.

  • Adobe Acrobat/Reader can not be used to view PDF's in Web browser.

    Does any one came accross the following message trying to view PDF's in web browser? "Adobe Acrobat/Reader that is running can not be used to view PDF documents in Web browser. Please exit the Acrobat?Reader application and try again". Thanks for your help! Barbara

    http://helpx.adobe.com/acrobat/using/display-pdf-browser-acrobat-xi.html

Maybe you are looking for

  • How to resize a SWF file to fit on stage

    Hi everyone, I'm fairly new to Flash so please bear with me. I'm trying to resize a SWF file made in InDesign. My Flash application is set at 1920x1080 and the SWF file was made at the same size. I need it to be resized to 1700x956. This is the secti

  • ITunes playlist empty after moving music folder

    I have recently moved my music folder to a different partition on my PC. After doing that, my entire song list, including playlists, has vanished from iTunes. I tried changing the media folder location by going to edit -> preferances -> advanced. I t

  • Inability to import a pdf made in Formscentral to illustrator fully...

    Dear guys, can u update the bug?? there is deletion of the white boxes where we write text once imported on illustrator...

  • Sales order to MM delivery sheduling from vendor

    My requiremnent is based on customer requested delivery date system will update customer number and materila and quantity in MM delivery sheduling sothat MM side they did delivery sheduling based on customet requested delivery date and stock reserver

  • Product Cost Sheet report from BW

    Hi, I would like to know if somone has generated the cost sheet report for product/material combination in BW. I have a requirement for report as follows: Cost Sheet for FG 101                                           Qty     Uom    Price    Resourc