CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 1999
    Posts
    492

    Can't read AppletViewer properties file "\.hotjava\properties"

    I'm learning Java right now and this is probably an extremely basic question as I have only reached lesson 4 in "Teach Yourself Java in 24 Hours 6th Edition"

    Anyway, in this lesson we create our first simple applet "RootApplet" and when I attempt to run I am given this error:

    "Warning: Can't read AppletViewer properties file: C:\Users\<Username>\.hotjava\properties Using defaults."

    I checked my computer and the folder ".hotjava" is not present at that location, and I cannot find it anywhere (though I checked with the Windows search in Windows Explorer which is wildly error prone)

    I also searched here and did not find any matches on ".hotjava"

    The almost overly thorough book does not address this error, the book's website seems very old and contains no help forum, and the hits I've found online don't help. A couple of them mention a failure with read/write permissions, but since the file doesn't exist at all this cannot be my error.

    Info:

    Windows 7
    Netbeans IDE 7.0.1
    Java SE Development Kit 7 (update 1)
    Why are the "tolerant" so easy to offend?

  2. #2
    Join Date
    May 2006
    Location
    UK
    Posts
    4,473

    Re: Can't read AppletViewer properties file "\.hotjava\properties"

    You are passing in an HTML file and not the Java file aren't you?

    Can you show the command you are using to run the applet and the HTML file containing the applet tag.
    Posting code? Use code tags like this: [code]...Your code here...[/code]
    Click here for examples of Java Code

  3. #3
    Join Date
    Aug 1999
    Posts
    492

    Re: Can't read AppletViewer properties file "\.hotjava\properties"

    This is all it is:

    Code:
    import java.awt.*;
    
    public class RootApplet extends javax.swing.JApplet {
        int number;
        
        public void init() {
            number = 225;
        }
        
        public void paint(Graphics screen) {
            Graphics2D screen2D = (Graphics2D) screen;
            screen2D.drawString("The square root of " +
                    number +
                    " is " +
                    Math.sqrt(number), 5, 500);
        }
    }
    And I am trying to run it from Netbeans by activating "Run File" from the "Run" menu.
    Why are the "tolerant" so easy to offend?

  4. #4
    Join Date
    Aug 1999
    Posts
    492

    Re: Can't read AppletViewer properties file "\.hotjava\properties"

    BTW: After making my post yesterday I literally gave up and went off to other tasks, most of which didn't even involve this computer. Today I screwed around on the web a little bit, clicked over to that Netbeans window, hit the Run--> Run File command and it works. I did absolutely nothing since writing that post and yet the applet suddenly works.

    Oh well! Thanks for the help, but I think I'm more confused now that things are working than when they were not!
    Why are the "tolerant" so easy to offend?

  5. #5
    Join Date
    Feb 2012
    Posts
    1

    Re: Can't read AppletViewer properties file "\.hotjava\properties"

    I got the same thing the first time I ran the applet, but it didn't happen the second time I ran it. It probably created the .hotjava folder after running it the first time.

  6. #6
    Join Date
    Apr 2012
    Posts
    1

    Re: Can't read AppletViewer properties file "\.hotjava\properties"

    Quote Originally Posted by jrembold View Post
    I got the same thing the first time I ran the applet, but it didn't happen the second time I ran it. It probably created the .hotjava folder after running it the first time.
    I can verify this as well. On second run, the error did not come up again.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured