Page 1 of 2 12 LastLast
Results 1 to 20 of 25
  1. #1
    billlin is offline Member
    Join Date
    Jun 2010
    Posts
    11
    Rep Power
    0

    Default Internet Explorer not update applet

    Hello, this is probably one of the simplest questions ever, but I just can't seam to find a response after a long time on google so ya...

    After creating an hello world applet, and then after I change a few the output, for example, and then use html to bring it into a web browser, INTERNET explorer does not update unless I close the browser and reopen it.

    Like, if I change something in the coding, compile it, and click refresh on internet explorer, it still shows the old applet, not the newly compiled one. The new applet only appears when I close internet explorer, then reopen it again.

    It's just a hassle.

    Is there an easy solution?

  2. #2
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    Other than trying to clear the cache(Ctrl + F5) I cant think of anything.

  3. #3
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    Emm...
    What about the static objects? Do you use static things in your applet code?
    If my answer helped you. Please click my "REP" button and add a comment
    Have a Good Java Coding :)

  4. #4
    billlin is offline Member
    Join Date
    Jun 2010
    Posts
    11
    Rep Power
    0

    Default

    I'm a total beginner in java, i've just learned the language through console, and decided to move onto apps. There's nothing static... it's just the helloworld app. the simplest. I noticed it didn't actually update when I changed the output text randomly.

    I tried pressing ctr + f5, but it doesn't reload for some fustrating reason.
    My Internet explorer seems to refresh every single web page like that except for the html documents that I create.

    Thanks for replies.

  5. #5
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,589
    Rep Power
    23

    Default

    What does it do in another brower like Firefox or Chrome?
    Its good to have more than one browser for testing.

  6. #6
    billlin is offline Member
    Join Date
    Jun 2010
    Posts
    11
    Rep Power
    0

    Default

    Firefox is updating even slower. Even after I close it, it doesn't update. I have to always wait like 5 mins before testing. So it's annoying when I'm just playing around 1 line of code.

    On opera, it simply doesn't work:

    It just says "Error Click For Details" on the applet, and when I do, java console popps up listing a whole bunch of errors.

    Am I the only one with this kinda porblem or is it common with browsers testing java applets??

  7. #7
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,589
    Rep Power
    23

    Default

    popps up listing a whole bunch of errors
    There could be some clues there. Copy and paste them here.

  8. #8
    billlin is offline Member
    Join Date
    Jun 2010
    Posts
    11
    Rep Power
    0

    Default

    Ok, so in the opera browser, the applet simply gives an empty box with "Error Click For Details" on it. After clicking on it, here's what I get:

    load: class GridLayoutExample not found.
    java.lang.ClassNotFoundException: GridLayoutExample
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
    at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.FileNotFoundException: \localhost\C:\Documents and Settings\Administrator\Java\ch3\GridLayoutExample. class (The filename, directory name, or volume label syntax is incorrect)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at sun.net.http://www.protocol.file.FileURLConn...onnect(Unknown Source)
    at sun.net.http://www.protocol.file.FileURLConn...Stream(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
    at sun.plugin2.applet.Applet2ClassLoader.access$000(U nknown Source)
    at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknow n Source)
    at java.security.AccessController.doPrivileged(Native Method)
    ... 7 more
    Exception: java.lang.ClassNotFoundException: GridLayoutExample
    I'm pretty sure this has nothing to do with the java code itself, because it runs fine on internet explorer, and mozilla firefox, but...

    do u think that it may be because internet explorer is loading the java applet from it's temp files, instead from the actually location? if so, how would I stop that?

  9. #9
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,589
    Rep Power
    23

    Default

    FileNotFoundException: \localhost\C:\Documents and Settings\Administrator\Java\ch3\GridLayoutExample. class (The filename, directory name, or volume label syntax is incorrect)
    That looks funny.
    Can you post the HTML you are using to load and execute the applet?

    I don't know what the problem could be. If you can open the html file with one browser and it works, but fails when you try to open the same html file in another browser.

  10. #10
    billlin is offline Member
    Join Date
    Jun 2010
    Posts
    11
    Rep Power
    0

    Default

    <html>
    <TITLE>Testing Applet</TITLE>
    <APPLET CODE="GridLayoutExample" WIDTH=300 HEIGHT=200>
    </APPLET>
    </html>
    I got this from a book so it shouldn't be wrong.

  11. #11
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,589
    Rep Power
    23

    Default

    Here's what is in my FF Java console with the HTML file with a missing class file.
    Notice the FileNotFoundException line in the middle. It does NOT have localhost in it. The same for IE8 and chrome.

    Why does your console listing have the \localhost\ in the path to the missing file?

    Java Plug-in 1.6.0_20
    Using JRE version 1.6.0_20-b02 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\Owner

    ----------------------------------------------------
    ...
    ----------------------------------------------------

    load: class GridLayoutExample not found.
    java.lang.ClassNotFoundException: GridLayoutExample
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
    at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.FileNotFoundException: C:\Temp\GridLayoutExample.class (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at sun.net.http://www.protocol.file.FileURLConn...onnect(Unknown Source)
    at sun.net.http://www.protocol.file.FileURLConn...Stream(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
    at sun.plugin2.applet.Applet2ClassLoader.access$000(U nknown Source)
    at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknow n Source)
    at java.security.AccessController.doPrivileged(Native Method)
    ... 7 more
    Exception: java.lang.ClassNotFoundException: GridLayoutExample
    Last edited by Norm; 07-01-2010 at 02:50 AM.

  12. #12
    billlin is offline Member
    Join Date
    Jun 2010
    Posts
    11
    Rep Power
    0

    Default

    um I don't know, I'm just a complete beginner with java. I've just read a java language book, and now I'm moving to applets. I'm sorry, but I have no idea why there's a local host thing. This error only happens on the opera browser. On firefox and internet explorer, it doesn't do that. I reread my book on java applets, and it didn't say anything about this sort of thing.

    should I just try reinstalling opera?

  13. #13
    Prajin's Avatar
    Prajin is offline Senior Member
    Join Date
    Jun 2010
    Location
    Ktm, Nepal
    Posts
    120
    Rep Power
    0

    Post

    Quote Originally Posted by billlin View Post

    should I just try reinstalling opera?
    No, becoz it's not the browser that giving problem.

    The errors clearly says it can't find class file. Meaning - is the .html and .class are in same directory, check it out.

  14. #14
    billlin is offline Member
    Join Date
    Jun 2010
    Posts
    11
    Rep Power
    0

    Default

    yes, the html file is in the same folder as the .class file. i've checked and the name is correct as well...

  15. #15
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,589
    Rep Power
    23

    Default

    n firefox and internet explorer, it doesn't do that
    Does that mean it works in those two browsers?
    That would mean there is a problem with the other browser

  16. #16
    billlin is offline Member
    Join Date
    Jun 2010
    Posts
    11
    Rep Power
    0

    Default

    Also, i've just noticed that the demo applets html files that comes when u download the jdk also doesn't work on opera.

    just tried this out.

  17. #17
    billlin is offline Member
    Join Date
    Jun 2010
    Posts
    11
    Rep Power
    0

    Default

    Norm, ya it works with internet explorer, and mozilla. That's why i think there's a problem with opera.

  18. #18
    billlin is offline Member
    Join Date
    Jun 2010
    Posts
    11
    Rep Power
    0

    Default

    k, I just reinstalled opera, and it still doesn't work. it shows the same message.
    Maybe it's just too hard to fix, and it's just better if I work around this?

  19. #19
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    just out of curiosity are you running the web site from localhost or just as a simple file from your system?

  20. #20
    billlin is offline Member
    Join Date
    Jun 2010
    Posts
    11
    Rep Power
    0

    Default

    al_Marshy, I'm not sure what u mean. I'm sorry, i'm a beginner with java programming.

    Anyways, I'm just running the web page with an html document that I typed up on notepad. Saved it, then right-clicked the document and said open-with Internet explorer.

    Hope this is what u are looking for.

Page 1 of 2 12 LastLast

Similar Threads

  1. Internet Explorer
    By maria.mt in forum New To Java
    Replies: 2
    Last Post: 04-17-2009, 05:10 AM
  2. Client Internet Explorer Setting
    By Mir in forum Networking
    Replies: 29
    Last Post: 06-26-2008, 12:01 PM
  3. Internet Explorer java version
    By shimer in forum Java Applets
    Replies: 2
    Last Post: 07-31-2007, 07:30 AM
  4. Internet Explorer is unable to open Office documents from an SSL Web site
    By pramod@netedgecomputing.c in forum Web Frameworks
    Replies: 0
    Last Post: 07-19-2007, 07:18 AM
  5. Problems with Internet Explorer and SSL Java
    By Peter in forum Advanced Java
    Replies: 2
    Last Post: 07-04-2007, 07:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •