Severe Problem in Applets

I hav problem in Applets by use of threads.The prb. is that i am supposed to create three threads in applets.Thread one will read a file and extract a character array of size 10 from it and Thread 2 will display those characters in Textarea of Applets and after 10 seconds Thread3 will delete those chracters from textarea and next character set of Array of size 10 from Thread one will be assigned to Thread2 and process should go on untill it reads all character from file.Please sort this problem with source code.All are warmly welcome.
Anuj.

Thread one will read a file Since applets cannot read from the filesystem you have to use the URL object to read the file and place the
file in the same location as your applet:
          try {
               url = new URL(this.getCodeBase(), "yourfile.txt");
               URLConnection conn = url.openConnection();
               InputStream in = conn.getInputStream();
               ByteArrayOutputStream bos = new ByteArrayOutputStream();
               byte[] buf = new byte[1024];
               int len;
               while ((len = in.read(buf)) > 0) {
                    bos.write(buf, 0, len);
               byte[] data = bos.toByteArray();
//               String dataString = new String(data,"Shift_JIS"); // depending on your file encoding
          } catch (Exception e) {
               e.printStackTrace(System.out);
          }How to use threads:
http://java.sun.com/docs/books/tutorial/essential/threads/index.html

Similar Messages

  • Adobe Bridge CS6 is malfunctioning after the last update raw 8.0.199. Several problems.

    Anything known on this issue? Solutions? Even importing files from memory card is a problem.
    In import window images are not diplayed as images but all the same blue mini images.
    vertical files are changed into landscape positions and more. Mac version.
    cj de vries

    Op 12 apr. 2014, om 19:27 heeft Yammer <[email protected]> het volgende geschreven:
    Re: Adobe Bridge CS6 is malfunctioning after the last update raw 8.0.199. Several problems.
    created by Yammer in Bridge General Discussion - View the full discussion
    http://helpx.adobe.com/bridge/kb/acr-84-bridge-cs6-metadata.html
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6292450#6292450
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6292450#6292450
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6292450#6292450. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Bridge General Discussion at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.
    THNX Problem solved

  • QT plug-in several problems

    Hi everyone,
    i'm developing a website which use QT plug-in to display an interactive VR movie. This website is composed with a first page with link to a second page that is written with classic ASP and is divided into two frames (upper wich contains the QT and lower which is the target (named targetFrame) of the hotspots).
    I control the QT-plg-in with javascript functions described here:
    https://developer.apple.com/documentation/QuickTime/Conceptual/QTScriptingJavaScript/bQTScripting_JavaScri_Document/chapter_1000_section_6.html#//apple_re f/doc/uid/TP40001526-CH001-DontLinkElementID14
    And i insert the QT OBJECT in my page with the javascript function suggested here:
    https://developer.apple.com/documentation/QuickTime/Conceptual/QTScripting_HTML/ index.html
    I have encountered several problems to realize this webpage and i ask your help:
    1) in IE (6/7):
    When the user open the second page, all is loaded perfectly, but if the second page were closed and reopened IE ALWAYS crash. I tried with Safari and Firefox but they works very fine.
    2) in Firefox:
    As i explained before, i control QT plug-in with javascript functions suggested by Apple, but Firefox don't recognize theese functions as valid functions and therefore not work.
    3) QT 7.2:
    To control the click of hotspot i use the object parameters like suggested by Apple,:
    QT_WriteOBJECT('vr/vr1.mov','545', '340','','HOTSPOT1','mylink1.asp','TARGET1','targetFrame','HOTSPOT2','mylink2.a sp','TARGET2','targetFrame')
    When i start to develope this website i used QT 6.5, and everything works fine, but when i have installed the QT 7.2, everytime i click on an hotspot it open the link in a new window instead of the target frame i choose.
    As you can realize i cannot publish this website, beacause of this problems.
    Please HELP ME!!!

    Hi Kirk, thank you for your answer.
    Unfortunately, i had to remove the Demo.
    However, i know that the demo works fine with Safari.
    The problems are with IE 6/7 or Firefox.
    I have noticed a strange behavior of the Demo for the first problem.
    I have converted all pages from asp to htm, and tried it in local.
    It works very well and IE never crash.
    I am driving crazy!

  • Since I upgrade my iphone 3gs to ios 5.1, I have several problems with network and wi-fi, any solution?

    Since I upgrade my iphone 3gs to ios 5.1, I have several problems with network and wi-fi, any solution? (No jailbreak)
    Most of the time the iphone cannot reach any network and when it can, there is no data transfer, I can only make calls and sms.

    Skizofrenias wrote:
    Since I upgrade my iphone 3gs to ios 5.1, I have several problems with network and wi-fi, any solution? (No jailbreak)
    Most of the time the iphone cannot reach any network and when it can, there is no data transfer, I can only make calls and sms.
    iOS: Troubleshooting Wi-Fi networks and connections
    iOS: Wi-Fi or Bluetooth settings grayed out or dim

  • 10.6.8 introduces several problem with mail, on one machine doesn't start on another it can't be seen from Safari, is that normal?

    I don't what's going on with 10.6.8
    Mail is suffering several problems.
    first of all, I made all the standard routines... permissions, etc.
    1) on one machine it starts, the dock icon is bouncing endless, and even forcing the index rebuilt, doesn't help.
    2) on another machine, mail is not recognized by Safari, it is not there it says (My fear is that is Safari the problem? Strange)...
    Do you have any other issue with Mail?

    I have reinstalled the combo update, last night... The Mail app works ok on one mac, but is isolated, so no other app can send to Mail.app any email content.
    Here you have the snapshots.
    and this is the info.
    I don't know what to do more... Shall I fill a bug report?

  • Caching problem in Applets - Java Control Panel

    I have a problem of applets being cached in Java Control Panel. Is there a way in Java to stop caching applets programatically in the Java Control Panel.
    There is one way to stop caching files by unchecking "Keep Temporary Files on my Computer" under Java Control Panel --> General --> Settings page.
    But I want to do this programatically using some Java programming/Java Scripting/some parameter in applet tag.
    Some solutions like setting cache_option = No, cache_archive= jar file name in PARAM tag in applet and classloader_cache="false" have been already tried. But noting is seeming to be working out.
    Can somebody please provide a solution.

    Following is the listener status
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 11-APR-2007 11:51:12
    Uptime 0 days 0 hr. 1 min. 28 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File I:\oracle\product\10.2.0\db_1\network\admin\listener.o
    ra
    Listener Log File I:\oracle\product\10.2.0\db_1\network\log\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jbpsouthcbg)(PORT=1521)))
    Services Summary...
    Service "jbpsouth" has 2 instance(s).
    Instance "jbpsouth", status UNKNOWN, has 2 handler(s) for this service...
    Instance "jbpsouth", status READY, has 2 handler(s) for this service...
    Service "jbpsouth_XPT" has 1 instance(s).
    Instance "jbpsouth", status READY, has 2 handler(s) for this service...
    The command completed successfully

  • Severe problem with 'Drill to Related' using drill icon

    Hi
    I have a severe problem with 'Drill to Related' in Discoverer Plus (10.1.2.54.25) using the drill icon of a worksheet:
    1. Though existing no items to drill to are shown in the context menu (or pop-up list), instead it says just 'Drill to Related...'
    2. Clicking on menue item 'Drill to Related...' results in 50% processor load (permanent) and no further update of the browser window (IE 7.0.5730.11) containig Discoverer Plus. There is no recovery of that state within about 20 minutes.
    This behaviour is both highly reproducible and annoying.
    When using the drill dialog instead of the icon the expected items are shown and 'Drill to Related' works fine. Although that is a workaround I don't think it acceptable to tell the end-users to use it.
    I searched metalink for a hint but couldn't find anything.
    Can anyone help?
    Franziska

    Hi S
    This seems to be a bug that was fixed earlier since we didn't experience it having applied cumulative patch 3 earlier.
    Something might be said about your problem in Metalink
    Doc ID: Note:422575.1
    Subject: Drilling With Discoverer Viewer 10g (10.1.2) Using Internet Explorer 7 (IE7) Fails With Javascript Error
    We still had to apply the patch for the bug I mentioned earlier in this thread in order to be able to see and select an item to drill to. Unfortunately the problem with the processor load up to 50% and nothing happening is still there.
    By the way IE 7 is certified now according to the Oracle certification information.
    Hope this helps
    Franziska

  • Problem calling applet method using IE

    I've searched through the forum and can't seem to find anything that can help me fix this. I'm trying to call an applet's method using Javascript. This is working fine under Netscape, but not IE. Everything I've read seems to indicate that I'm doing this right, but I'm getting "Object doesn't support this property or method" when I try to call the applet method from IE.
    In this example method, I'm trying to call the applet's countChars method, which should return the length of the string you pass into it. Works under Netscape 6.2, but not IE 6.0
    Here's my applet code:
    import java.lang.String;
    public class test extends java.applet.Applet {
    public static int countChars(String s) {
    return s.length();
    And my HTML
    <HTML>
    <HEAD>
    <script language="Javascript">
    function refreshApplet()
    /*     i = document.forms.myForm.TestApplet.countChars();
         document.forms.myForm.output.value=i; */
         document.forms.myForm.output.value=document.applets["TestApplet"].countChars(document.forms.myForm.input.value);
    </script>
    </HEAD>
    <BODY>
    <APPLET CODE = "test.class" WIDTH = 400 HEIGHT = 400 ALIGN = middle NAME = "TestApplet" scriptable="true">
    </APPLET>
    <br>
    <form name="myForm">
    <input type="text" name="input">
    <input type="button" value="click me" onClick="refreshApplet();">
    <hr>
    <input type="text" name="output">
    </form>
    </BODY>
    </HTML>
    Thanks in advance!
    Craig Drabik
    Sr. Programmer/Analyst
    University at Buffalo

    I have very similar problem, my applet works OK using Netscape (6.2 and 7.0), but with IE 6.0 It only works with windows XP;
    The reported error is "Object doesn't support this property or method"
    Can someone please help me to solve this problem.
    Cheers
    Horus
    This is my code:
    - I call the applet using javaScript and input the method setData with two strings.
    function graphic()
         var dataZenith;
         var dataManual;
         initVariables();
         dataZenith = graphicZENith(); //Call other Javascript functions
         dataManual = graphicManual(); //Call other Javascript functions
         document.AppletOne.setData(dataZenith,dataManual);
    I run the applet with this HTML code:
    <applet NAME="AppletOne" code="Appl.class" width="450" height="450"
    MAYSCRIPT></applet>
    //Applet code/////////////
    import java.awt.*;
    import java.awt.geom.*;
    import java.applet.*;
    import java.util.*;
    public class Appl extends Applet {
         private int [] myArray1 = new int [156];     
         private int [] myArray2 = new int [156];
         private boolean flag = false;
         // maxDataYAxesNumber es usado para dividir el eje de las Y
    public void init()
              setFont(new Font("SansSerif", Font.BOLD, 12));
              setBackground (Color.white);
              setSize(getSize());     
    // Get data and put in an array
    public void setData(String data1, String data2)
              final String DELIMITER = ",";
              final StringTokenizer theTokens1 =
                   new StringTokenizer(data1, DELIMITER);     
              final StringTokenizer theTokens2 =
                   new StringTokenizer(data2, DELIMITER);
              try
                        String dataX = data1;
                        for (int i = 0; i < 156; i++)
                        myArray1[i] = Integer.parseInt(theTokens1.nextToken().trim());
                        myArray2[i] = Integer.parseInt(theTokens2.nextToken().trim());
              catch (NumberFormatException e) {};
              flag = true; //I get the data OK
              repaint();
    public void paint (Graphics g){
    Graphics2D g2d = (Graphics2D)g;
    setData(data1, data2) ;
    if (flag == true)
                   //Call other functions to process the graphic
    else g2d.drawString(" Sorry I can get Data", 100,80);          

  • Several problems continuous since first installing Firefox. Personal google search settings don't save; remember me options on web sites like Facebook aren't remembered; Youtube and Flixy videos don't play despite removing/reinstalling/upgrading Firefox s

    Several problems continuous since first installing Firefox. Personal google search settings don't save; remember me options on web sites like Facebook aren't remembered; Youtube and Flixy videos don't play despite removing/reinstalling/upgrading Firefox several times; upgraded the latest flash plugin today, but no difference, symptoms are black play box with youtube and white box with Flixy. Disbale AV and antimalware makes no difference either.
    == URL of affected sites ==
    http://

    I have a new problem with secondary web pages opening up without any action on my part other than simply moving the mouse pointer across the screen.

  • My old version of outlook express has several problems, will these be imported into a new thunderbird account

    My old version of Outlook Express has gained several problems. It is time to change, will these errors be imported into a new Thunderbird account. I'm hoping that all would be well based on the belief that the two programmes are totally different.

    You're not saying what problems you have with OE, so how should anyone guess?
    There is no such thing as a 'Thunderbird account'. You do have an account with your email provider. You can use OE or Thunderbird to access that account.
    But Thunderbird is not your email provider.

  • Several Problems with Visual Editor 1.1

    I have installed the latest version of visual editor and also the emf and gef version required,the problem comes when i try to create a new Vsual class after i choose the property of the class such as name and so on and clicked finish My visual editor is empty.....the palette for visual component doesn't appear.
    The visual editor creates a little window and duplicates it evrey time i click in the visualEditor page......please help me...i don't know what i have to do.... i tried the impossible but visual editr still doesn't work!

    Mmm yes it's true, I have a virus checker on my computer...
    and I have tried it twice to download WLS6.1 and always the same problem....so
    I'll try again.
    As for the last point (quick deploy of ejbs without compiling the classes)- Has
    anybody managed to do it? It really could be helpful is somebody, who managed
    to deploy a bean like this (without compiling) could post it to me, so I can examine
    it...
    You can mail it to [email protected]
    Thanks
    Francesco
    David Felts <[email protected]> wrote:
    It sounds like there is a problem with your downloaded version of the
    installer.
    Perhaps your download was corrupted by a running virus checker - we've
    seen that
    before. If you have a virus checker active, flush your browser cache,
    turn off the
    virus checker and reboot. Attempt to download again and run the install
    program.
    You should be prompted for the password and JDK 1.3.1 should be installed
    on your
    system.
    Francesco wrote:
    Hi all,
    I have downloaded WLS 6.1 (NT /2000 version) but
    I found several problems with it.
    1) During the installation I'm not asked anymore
    a password for my domain (feature or bug?)
    2) The installation doesn't install jdk1.3.1
    as required by setEnv.cmd. I have arranged the problem
    pointing to my elder jdk1.3.0 that comes with WLS 6.0 but I don't knowif it's
    correct this behaviour.
    3) I have read in the docs that it's possible to deploy
    EJB in a very quick way, without even compiling the classes.
    So I have tried to pack the basic stateless Trader example
    like this:
    META-INF\
    ejb-jar.xml
    weblogic-ejb-jar.xml
    examples\
    ejb\
    basic\
    statelessSession\
    Trader.java
    TraderBean.java
    TraderHome.java
    TradeResult.java
    But then I get only a Stack-trace full of exceptions stating that
    <3-set-01 13.58.26 GMT+02:00> <Error> <Management> <Error deployingapplication
    \config\mydomain\applications\basic.jar: java.lang.reflect.UndeclaredThrowa
    bleException>
    Is anyone aware about how to solve this problems?
    Thanks
    Francesco

  • Here are some extremely severe problem of lumia

    There are several severe problems have not solved by nokia. One of these important things mentioned by customers was "Data Sense". This is an important feature for all of the customers, to know how much data they used. In addition, there is a link talked about that 
    http://discussions.nokia.com/t5/Nokia-Lumia/How-can-i-get-Data-Sense-or-Nokia-counter-from-WP8-Store...
    said the problem has been solved. However, there is no solution. 
    Some one just said it is depending on carrier and nokia take no responsibility for that... Why Nokia hold this attitude to your customer? Are there any solution you can give us? The store even has no similar software for that.
    I don't want to mention there are so much functions are locked, and we have no choice to do it by ourselves. Could I change the system to other countries to solve those problems? or give us a schedule but NOT "later" or "at the end of year" how and when this company unlock those functions for their nokia follower

    You think it's important to 99% of Windows Phone users but seeing how this issue is hardly ever brought up and generally if it does the same bunch pops in to comment it's more likely to be a single digit number if that.
    Would data monitoring be useful? certainly, especially where unlimited or affordable large data plans are rare.
    Is it a dealbreaker? hardly, at least not in general.
    Do I think Nokia should provide the previously available tool for WP8? Yes they should
    Click on the blue Star Icon below if my advice has helped you or press the 'Accept As Solution' link if I solved your problem..

  • Problem downloading applet in W2K with SP4.

    Hi,
    We are using a Security Applet in our web application for validation purposes. We were using W2K Professional / W2K Server with SP3 and Sun JRE 1.3.x. The application was working as expected.
    We are now testing with W2K Server with SP4 (to upgrade to SP4). The current testing environment is W2K Server with SP4 and Sun JRE1.3.x. Now with the setup, we are facing a problem in downloading the applet (Security Applet). The downloading applet fails and the subsequent loading as well.
    Please advice. Does it requires any particular settings to be done at Client?
    The specs are
    Windows 2000 Server, SP4
    IE 6 SP1
    Sun Jre 1.3.x
    Problem:Downloading applet fails.
    PS: When we test with SP3, we can see the applet downloaded (CAB File), with SP4 it was not found.
    Thanks in Advance,
    Prakash

    Does the w2k sp4 server host your pages and applet?
    If yes then why install the SUN JRE 1.3 on the server, doesn't the client need this?
    Is the cab format supported by SUN jre or is it meant for msjvm and if so why is the client trying to open
    the cab with sun jre?
    http://java.sun.com/j2se/1.4.2/docs/guide/deployment/deployment-guide/upgrade-guide/article-02.html
    What's on the server doesn't have anything to do with the applet. The server is
    just serving it. Forcing the client/consumer of the html page with the applet is trying to open an applet
    with sun jre while the applet is ment for msjvm causes the error.
    The client can fix this by opening IE and check under tools -> internet options -> advanced -> UNCHECK
    the use sun jre ... for <applet tag. For the XP machine you might have a problem. Some of the don't have
    the msjvm at all so there is nothing to run the <applet, I tried to download it at microsoft but was unable
    to find it.

  • After update, several problems (battery, factory recovery, Message icon)

    After Froyo update, I found out several problems.
    1) Battery.
    It drains two times faster than before. My one does. My wife's one is worst (maybe 3-4 times faster and also the phone is hotter than mine).
    2) Factory Recovery option
    I could not find any factory recovery button from mine and wife's.
    3) "Message" icon
    My one has no "Message" icon. It has just three icons "Pone/Contacts/Applications" at the bottom of the screen.
    But my wife's has all four icons "Phone/Contacts/Message/Applications"
    I don't know how to correct these.

    It sounds like most of your issues can be found by doing a factory restore on the phone.  Settings>privacy>factory data reset. The icons are customizable.  Press icon to bring up all icons.  Touch and hold on the icon you want on the main screen. You can touch and hold on a blank spot on home screen to add a widget. 
    As for battery issues, the issue has been escalated to Samsung, and we are working with them to get a resolution as quickly as possible.
    Let us know if that helps out!

  • Anyone experiencing severe problems with Aperture3 after loading Lion?

    I am experiencing severe problems with my Aperture 3 programme since installing Lion OSX, in fact it is almost unusable after about 15 minutes operation. My computer is only used for photography and is otherwise unburden. I would appreciate any help at allplease.

    Try the Aperture forum, and you might want to describe the issue in moe detail there to get help.
    Regards
    TD

Maybe you are looking for

  • I have saved a form in pdf and i want to use it in my business i need to save it so i can fill in

    i want to use a form i saved in pdf, i want to fill it in and it will not let me type on it.  how to i save it and use it when i need it?

  • Webservice with zip attached file

    Hi everyone. I have to receive a webservice with a zip archive as an attachment. I think that i can do this in two steps. First of all, i have to get that file and put it in a folder. Problem is that is not a plain text or a xml so i don't know how t

  • How to turn of the Volume limit on my iphone 5s?

    I can't use speakers or can barely hear anything on headphones because my iphone 5s only has half of the maximum volume. Cant turn it up either, hate it. settings-music-volume limit. I'm trying to turn it up, but it wont work. I think the European Un

  • ORA-01401 ORA-06512

    Has anyone experienced an ORA-01401: Inserted value too large for column, followed by an ORA-06512: at line 1 when uploading a presentation to the catalog in jdeveloper. I'm using 9.2.0.4.0 database, jdeveloper 9.0.3.1035 and bibeans 9.0.3 Some prese

  • Conditional Validation using JSLink

    I have a User field and a Choice field in a list.  When the Choice field has the option "A" selected I want the User field to be mandatory.  Validation formulas in lists cannot use User field data types so this is not an option.  Is JSLink the way to