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)
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.
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.
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!
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.
Re: Can't read AppletViewer properties file "\.hotjava\properties"
Quote:
Originally Posted by
jrembold
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.