-
November 28th, 2011, 03:13 PM
#1
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?
-
November 29th, 2011, 06:59 AM
#2
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.
-
November 29th, 2011, 10:39 AM
#3
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?
-
November 29th, 2011, 10:42 AM
#4
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?
-
February 1st, 2012, 03:23 PM
#5
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.
-
April 13th, 2012, 02:20 PM
#6
Re: Can't read AppletViewer properties file "\.hotjava\properties"
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|