Applet can't read files

Hello!
I have developped ticker news applet
A previous version was working fine. The applet had a thread. I used the pain method to display texte and logos. It took the news a logo from the applets parameters and printing them one by one on the html page.
Now the problem was that I had to refresh the whole applet to change the news. That's why I developped another version that extract the news and links to images from 2 separated files. One file contains the news texts, the other the logos. Each one is uploads in a vector. The applet is working fine in textpad but not in the browser.
The error I get in the console is array out of bound. The vector seems to be empty. My diagnotic is that the applet can't read the file. Am I right? Any solutions
Here's the applet call and its parameters.
mess.txt contains the news
newsimage.txt the links to the images. Actually the images are in the home directory.
<applet code="aTicker.class" archive="aTicker.jar"
          hspace=0 vspace=0 border=0 align="left" width=640 height=38 MAYSCRIPT>
     <param name="newsfile" value="mess.txt">
     <param name="imagefile" value="newsimage.txt">
     <param name="pas" value="650">
     <param name="cSep" value=";">
     <param name="speed" value="4">
     <param name="delay" value="30">
     <param name="xSpace" value="50">
     <param name="prepicdelay" value="1000">
     <param name="picdelay" value="2000">
     <param name="scrollingdelay" value="100">
     <param name="local" value="true">
     <param name="Font2" value="Verdana, 40, 0, 16776960">
     <param name="Font1" value="Serif , 40, 1, 16776960 ">
</applet>
I found this link but it didn't help me
http://java.sun.com/sfaq/#read
[email protected]

All that can be said from the info you provide is that an array is being accessed with an invalid index value. Your guess may (or may not) be correct.
Sprinkle some System.out.println statements through the code and do some diagnostics. The println's will output their data in the Sun Java Console.

Similar Messages

  • Can't download driver for HP F4440 on my 10.6.8  ... says can't read file.

    Can't download driver for  HP Deskjet F4440 on my 10.6.8 ... says can't read file.
    Anyone experienced this?   Also weird, because I thought I had 7.0...Apple store says it downloaded Mountain Lion (the "cat" after Snow Leopard, right?) So why does it still say 10.6.8?
    Regardless, I need to use this printer as I just moved and need to print out important stuff for my business.  But  can't download the driver.  Why can't it read it?
    And I don't have the $30 to pay for HP tech support.
    Thanks anyone who can help with this.

    Hi peshi77,
    Welcome to the HP Support Forums! I see you are trying to install your HP Laserjet P1006 to your computer running Windows 8.1, but everytime you attempt to extract the files it crashes. After some research I see there were no updated drivers made available for the Windows 8.1 OS, you must install the Hostbased Plug and Play Basic Driver, to get the basic printing functions. Please click on the link below to download and install:
    HP LaserJet P1000-P1500 Hostbased Plug and Play Basic Driver
    Once downloaded, please follow the on screen instructions. I hope this helps!
    Thanks,
    HevnLgh
    I work on behalf of HP
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to the left of the reply button to say “Thanks” for helping!

  • I just stared having problems with importing files from nikon D810 into LR 5.7 it pop a window saying it can not read files on working on a imac 27" running yosemite on my mac pro after a few times it finally was able to read files and import them into LR

    I just stared having problems with importing files from nikon D810 into LR 5.7 it pop a window saying it can not read files on working on a imac 27" running yosemite on my mac pro after a few times it finally was able to read files and import them into LR I never had this problem before was there some kind of update that could of cause this?

  • Applet can't read local file on web server, security issue!

    There is any way to read/write files of web server through the applet except the Signed Applet.
    If any idea the reply me soon.
    Thanks in advance

    Applets are downloaded from web servers and execute on the client machine.
    Therefore they have no access to the web server file system, signed or not.
    They could have access to the client file system (the machine where they run),
    but for security reasons only signed applets have this privilege.
    So to answer your question, you sign if you want to access client files.
    To access web server files, you don't need to sign the applet, but you need
    to provide some method of accessing files remotely, for instance:
    - Files published for the web can be read using HTTP
    - Files can be read or writen with the help of an FTP server on the same machine as the web server
    - A servlet running on the HTTP server can collaborate with your applet to exchange files

  • Signed applet can't read image file..

    Hello
    My English ability is very poor.. sorry
    I make a signed applet
    and I open Internet Exploere
    I connect to my web page
    when I connect to my web page
    my signed applet upload "c:\blahbalh...\image.gif" automatically
    but It's not work
    java.security.AccessControlException: access denied (java.io.FilePermission C:\DOCUME~1\krict\LOCALS~1\Temp\Hnc\BinData\EMB00000cac2143.jpg read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkRead(Unknown Source)
         at java.io.FileInputStream.<init>(Unknown Source)
         at java.io.FileInputStream.<init>(Unknown Source)
         at EchoApplet.onSendData(EchoApplet.java:61)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.invoke.JSInvoke.invoke(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
         at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
         at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
         at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
    signed applet can't not read file..
    how can I solve my problem?

    Trace please.
    http://forum.java.sun.com/thread.jspa?threadID=656028
    Maybe some relevant code
    Signing applets:
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post and reply 18 for the java class file using doprivileged

  • Signed Applet can't read an image file??

    Hi my dear java folks,
    I've written a simple applet and self-signed it in order to have access
    to local machine's files.
    The applet as you see needs to read an image file (arrow.gif).
    The applet is:
    import.....
    public class MyApplet extends JApplet{
    JButton button1=new JButton("Save");
    JButton button2=new JButton(new ImageIcon("arrow.gif"));
    public void init(){
    button1.setBounds(10,70,80,20);
    button2.setBounds(10,100,80,20);
    getContentPane().setLayout(null);
    getContentPane().add(button1);
    getContentPane().add(button2);
    The java.policy file is:
    keystore ".//myworkingstore.store";
    grant codeBase "http://fin2000/htdocs/MyApplet.class" {
    permission java.io.FilePermission "<<ALL FILES>>","read";
    permission java.io.AllPermission;
    grant codeBase "." signedBy "MyName" {
    permission java.io.FilePermission "${user.home}/*.*","read,write";
    permission java.io.FilePermission "<<ALL FILES>>","read";
    permission java.io.AllPermission;
    The java.security file is on the server
    (on my server I have Oracle8.1/Apache installed):
    policy.url.1=file:d:/oracle/ora81/apache/apache/htdocs/java.policy;
    My problem is when I run my applet through a html file
    "http://myServerName/test.html" in my browser, the applet
    runs correctly except it's button2 (the iconized button), the
    button comes without it's ImageIcon on it.
    I receive no errors, no messages and no signs of error
    I am completely confused!
    Need Urgent Help
    Thank you , Jamanir

    Hi,
    this has nothing to do with a security problem.
    Change you code as follow:
      JButton button2 = new JButton(new ImageIcon(getClass().getResource("arrow.gif")) ;Pack arrow.gif in the same directory/package as MyApplet.class in the jar file and It should solve your problem...
    The problem is that when you write new ImageIcon("arrow.gif"), it works locally as a standalone application, because "arrow.gif" is mapped to the current directory where you application is started from. This has no meaning when you works online with an applet. That's the reason why your graphic was not found.
    getClass().getResource("arrow.gif") returns an URL pointing to a file "arrow.gif" located at the same location as the class. This always works either locally or online, other packed in a Jar file, or unpacked.
    Yannick

  • Cameraw raw says it can't read files from T2i from 6.1 but ...

    I had installed CS5 as trial and installed Camera Raw 6.1 - everything worked fine.
    Then I bought and registered CS5, uninstalled CS4 and suddenly LR 2.7 didn't find CS5 as an external editor - even after a reboot and there was no apparent way to make it do that.
    So, I uninstalled CS5 and reinstalled and it showed up in LR 2.7.
    Now, however, CS5 does not recognize my Canon T2i files as it says the Camera Raw version does not support the file format. It did before i bought and registered in the extended version but when i put the new serial number in and it went from extended the regular version, it stopped being able to read the files.
    My version in about and plugins is 6.0.0.205 in CS5 now
    I have downloaded and attempted to install the camera raw 6.1 updater several times - it says some updates failed to install- update is not applicable.
    Tech support says that is the newest version.
    In my trial version, the updater installed, i could read T2i files but now it won't install and i can't read my T2i files.
    I can go through Lightroom which seems to read them OK - I even resinstalled LR 2.7
    What can I do? I want to be able to read some files directly in PS CS5 from the T2i files.
    Thanks
    Greg Summers

    You should ask in the  Camera Raw forum.

  • Can't read chinese,can't read files from memory ca...

    is there anyone in here who can HELP me..! i two years ago i bought nokia N80 while i was in Finland.with the model :N80-1 code : 0529381 type: RM-92.yesterday,i was trying to update it from V 4.0623.0.42 of 20.09.2006 to V 5.0719.0.2 0f 24-05-2007..it works great,with new features..but am facing three problems now
    1.i cant read chinese characters (they all looks like boxes)
    2.i cant read my memory card(mini sd 2G)
    3.i want to watch a movie through it,i mean i can copy and paste into my SD card,but i dont know which software should i use so that i can be able to watch through my mobile.
    anyone to help
    thank you guys

    I can't read Chinese mails from my pals in China.
    They show like this:
    I tried to change the encoding, but nothing changed.
    What's wrong with it? how can i read this mail?
    For one of these messages, go to View > Message > Long Headers and tell us what the Content-Type header says. That is the encoding you need to choose in Message > Text Encoding.
    Everytime I write in Chinese and
    Japanese, I have to change to the encoding of the
    right language manually, otherwise my friends won't
    be able to read them. How can Mail recognize what
    language I am writing in and change to the right
    encoding automatically?
    The encodings being used by Mail are already "right" by international standards, but the software being used by your friends apparently requires something else. You can fix it for one of the languages with the info in this note, but the other you would still have to do manually:
    http://discussions.apple.com/thread.jspa?threadID=121808&tstart=60

  • Can not read file from URL

    I have this code for loadbitmap() function:
    String s = getCodeBase()+sdir+sfile;
    System.out.println("codeBase is=" + s);
    URL url = new URL(s);
    InputStream fs = url.openStream();
    BufferedInputStream bs = new BufferedInputStream(fs);
    And the file is a .bmp file, so I go on decoding this etc. It works fine within VisualCafe.
    When I created a virtual directory in IIS and run this applet from
    http://localhost/ImageApplet/ImageApplet.html address:
    I get in 1.3.1 Plug-in this error:
    codeBase is=http://localhost/ImageApplet/duke/some1.BMP
    Caught exception in loadbitmap!java.io.FileNotFoundException: http://localhost/ImageApplet/duke/some1.BMP
    If a type this as address in browser, it shows the image.
    Could any one tell me what I am doing wrong here?

    You can try this, even though it is not supposed to be different from your original code:
    URL url = new URL(getCodeBase(), sdir+sfile);
    System.out.println("getting image from " + url);
    InputStream fs = url.openStream();
    BufferedInputStream bs = new BufferedInputStream(fs);
    I could understand a SecurityException but a FileNotFoundException... A FileNotFoundException... You are reading from a stream originating from a URL, not a file!!!
    Which line causes the exception?

  • JavaFX desktop app can't read files

    Hi!
    I have a javaFX application with Java and JavaFX mixed code what works fine when I start it using : javafx -cp ... appClass
    But when I try to start it using: javaws app.jnpl it doesn't work (Main stage does not displayed)
    I found that app silently fails at first disk access: somewhere like that
      File folder = new File(".");
      File[] listOfFiles = folder.listFiles();
      for (int i = 0; i < listOfFiles.length; i++) {... in Java class
    or that :
    design.label.text= new File("test").getAbsolutePath();in Java.fx class
    I never used Java Web Start before.If that is a web start access limitation or restriction is there any way to bypass it?
    Thank you.

    It's probably the case.
    Modify the options of Java in the control panel to automatically display the Java Console when starting a program or an applet so you can try to see any uncaught exception. You'll probably get a SecurityException or an IllegalAccess.
    You'll then need to change your JNLP to request all permissions and to sign you app (see Java Web Start documentation on how to generate a temporary certificate - also NetBeans can do that for you, have a look at the project's settings).

  • DVD Player can't read files burned in Finder

    Hello all,
    I had an avi file that I converted to play as a DVD using ffmpegx. I burned it to a DVD-R in the Finder, ejected it, popped it back in and the DVD player says "supported disc not available." It plays fine in one of my DVD players (curiously, the older one) but not the other. I burned the exact same files using Toast, and the MBP DVD Player reads it just fine. It also plays on just the older DVD player.
    DVD player will also not play the TS_VIDEO file straight off the computer, only after it is burned to a DVD-R using Toast. What is going on here?
    I am just trying to find a format that will work in any reasonably new computer or player I put it in, so I can mail them out to people and not have them complain they don't work. But it doesn't even play on the brand new computer that made it. How lame is that?
    MBP 2.16 Core 2 Duo   Mac OS X (10.4.8)  

    I went to a very well respect technology chain of stores in England called "Maplin" to inquire about these brush cleaners.  In fact I went to two different locations to double check.  They told that there are problems with Macs where the little brushes break off and get stuck inside the machine.
    So I took my IMac to the Apple store.   Decided there was no choice but to replace the drive.  I am very disappointed.  They drive runs as loud as a hair dryer (I exaggerate a litte), which I cannot believe is correct.  My computer is 4 years and my old drive was quiet as a mouse.  Looks like I will be dragging my computer back to the store.  Very disappointmented in Apple's service here.
    (Also, they kept the DVD that I had in the disc when I arrived).

  • Please how can i read file, to find number of lines and to extract number of block data, and number of data in each block

    please if you can give me an example

    I attach a file wich i want read:
    1- to know a number of lines in file
    2- from the second line of the file to the line befor NCOUNT, put the lines in array like this, Variable and values like this Ex: TIMET 1 0 1 ..... first line
    and put the values of NCOUNT in array
    I attach a file
    Attachments:
    karim1.txt ‏2 KB
    Read_Filenew.vi ‏29 KB

  • How the applet can access local file system?

    1. I want to plugin the applet into the JSP. That applet should access the local file system. How to enable this programmatically.
    2. Is it is possible to embed a frame inside the JSP. If so how?
    Thanks in advance..
    K G Vinoth

    1: If you want the applet to access the client's local file system you'll have to sign the applet. There is a tutorial some where on the java.sun.com that explains how to sign an applet.
    2: No you;ll need to use an applet to display swing or awt components on the client browser.

  • Applet can not read from servlet because of java.io.EOFException

    Hi all,
    i try to communicate my applet with a servlet. i examine lots of codes from internet and i did lots of things to get a working sample but i couldn't sucess on this work for 2 days so if anyone can help me i will be very happy.
    Anyway, here is the code snippets :
    1- Applet side code to send data (serializabed object) to servlet :
       // Opening connection...
       URL urlServlet = new URL("http", "81.214.190.3", 8080, "/pwta/pwtax");
       URLConnection connection = urlServlet.openConnection();
       // Setting attributes...
       connection.setDoInput(true);
       connection.setDoOutput(true);
       connection.setUseCaches(false);
       connection.setDefaultUseCaches(false);
       connection.setRequestProperty("Content-Type",
                                                                  "application/octet-stream");
       OutputStream outputStream = connection.getOutputStream();
       ObjectOutputStream objectOutputStream = new ObjectOutputStream (outputStream);
       objectOutputStream.writeObject(islem);
       objectOutputStream.flush();
       objectOutputStream.close();
       // Receiving result from servlet...
      // Exception is thrown at line 71! Detail is written at bottom of message!
      InputStream inputStream = con.getInputStream(); // line 71 is here!!!
      ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
      returnValue = (Sonuc) objectInputStream.readObject();
      objectInputStream.close();
      inputStream.close();
    2- Server side code which read data and sendit after processing  to   applet  :
    // Reading requirement... Implementation is done in doPost() method!
        InputStream in = request.getInputStream();
        ObjectInputStream inputFromApplet = new ObjectInputStream(in);
        Islem islem = (Islem) inputFromApplet.readObject();
        inputFromApplet.close();
        // Doing the required job!
       setMapperAndDoTheJob(islem);
       // Writing the result to user...
       OutputStream outstr = response.getOutputStream();
       ObjectOutputStream oos = new ObjectOutputStream(outstr);
       oos.writeObject(sonuc);
       oos.flush();
       oos.close();
    //  *************************************************************************When i run my applet the following exception is thrown :
    java.io.EOFException
    at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
    at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
    at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
    at java.io.ObjectInputStream.<init>(Unknown Source)
    at tr.com.proksis.pwta.domain.PWTAProcessor.transferProcess(PWTAProcessor.java:71)
    Best Regards,
    eRoHaN

    get it working using a text transfer before you use and object transfer

  • Can't read files?

    I tried to import files for the first time and LR 4.3 said they can't be read.  I've already had difficulty with the install not working on my user account so I had to set up a new one for LR to work and now this. 

    johnfrost530$ wrote:
    Victoria, you're right.  I'm making the jump from iPhoto to Lightroom 4.3 so the idea of having to tell the software where to put my pictures was pretty foreign to me.  The video Geoff suggested did quickly cover it but I had to get to my destination folder choices a slightly different way.  The bottom line is that I thought that clicking the Import button was all I needed to do.  I feel like an idiot but do appreciate your patience.
    Thanks for reporting back John, we've all felt like idiots a times !!

Maybe you are looking for

  • How can I use a different driver for audio input and output?

    I did a search of course, and came up with something about an aggregate. I have no idea what this is, how to do it, or if it would even work for me. What I am trying to do is: 1) Record into Logic Express using my Tascam US-122. 2) Have playback come

  • How to backup RME in lms 3.2

    I am going to update RME 4.3.0 to 4.3.1. It is recommended that I take a backup of the RME data. How do I backup RME on Solaris? Please help. Thanks, Katarina

  • E_ADEPT_DATABASE Duplicate entry

    This is the HTTP response I get from attempting to open an acsm file. <error xmlns="http://ns.adobe.com/adept" data="E_ADEPT_DATABASE http://books.google.com/books/acs4/fulfillment/Auth Duplicate%20entry%20'Vêw%0e‰fJø»¾P�&#127;%12‰'%20for%20key%201"/

  • Project keeps crashing. I have a screen cap, what do I do?

    Hi. I have a premeire project that keeps crashing. I've included a screen cap. I had an issue with my dynamic link and audition, we fixed it over the phone by installing and uninstalling but I've had nothing but problems since. this latest project ha

  • Oracle AS 10gR2  with Oracle 11g Database

    Hi, I am running oracle 10g AS R2 on linux ES 4.5 & Oracle 11g DB on Linux ES 4.5. But I used Oracle 10g R2 DB while i developed & tested the system. No the problem is :: while my forms call some sp from the database 11g they no longer work. the SQL