Paul Houser

Ranch Hand
+ Follow
since Nov 06, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Paul Houser

I don't think Applet permissions would allow that to be possible (unless it was signed)
20 years ago
This is what I do to load an image:

Image image = this.getImage(getDocumentBase(), "images/image.png");

where: "this" is the class implementing the applet (presuming you load the image from that class) and getDocumentBase() returns the folder of html file running the applet


Hope that helps.
20 years ago
I'ld just like to praise this website in general, it's been a wonderful resource for me and the people that made the site should be proud.
20 years ago
Thank you! I wasn't sure when I posted where it should go.
20 years ago
I'm trying to connect to a mySQL database in my Applet and I get this Exception on the line that connects to it:

java.sql.SQLException: Unable to connect to any hosts due to exception: java.security.AccessControlException: access denied (java.util.PropertyPermission file.encoding read)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1797)
at com.mysql.jdbc.Connection.<init>(Connection.java:562)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:361)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at unknown.DBConn.<init>(DBConn.java:25)
at unknown.Unknown.init(Unknown.java:22)
at sun.applet.AppletPanel.run(AppletPanel.java:353)
at java.lang.Thread.run(Thread.java:534)

The applet is trying to connect to a database at localhost:3306, and the user I'm trying to connect with has all priveledges. The program seems to work when I run it as the local filesystem (through applet viewer), but it gives this exception when loading through an HTML file on my webserver (same machine).

Any help is appreciated.
[ August 17, 2004: Message edited by: Paul Houser ]
20 years ago
Wow! I want this book.

I've used Eclipse for almost a year now and so I feel I've almost mastered many of the IDE's functions, but I still haven't done any work with plugins... how in depth does the book go into writing plugins?
I've read that Java cannot connect to a serer using the old style unix conection sockets, but my server requires that I connect like this from PHP:

localhost:/home/*YOURUSERNAME*/*YOURDOMAIN.COM*/.database/mysql/mysql.sock

Which works fine with PHP, but I need to connect from a Java application. Is it possible with the Java API? Does anyone know of a library I can download that allows this?
I don't know if this is the right place to ask this, but how do I upload a file to an FTP or HTTP location using Java? Do I need any seperate API?
You're absolutely right. I don't know what I was thinking. I need to stop writing messages before drinking any coffee.
20 years ago
OK, I can do that. Just one other thing bothers me, though, even though I'll be packaging the program in a JAR, will someone be able to use the encryption class in their program?

Thanks a lot for everyone's help.
20 years ago
Well basically it's an online multiplayer Tetris game that connects to a mySQL database to store things like scores and collect "room" information. It needs a server password to connect to the database, and I don't want the password to be public because the same database stores user accounts.
20 years ago
I suppose that would be possible, I was just hoping not to write any encryption/decryption algorithms.
20 years ago
When a constant string is compiled to a class file, the entire string is copied into the class as plain text. This is a bit of a problem when one is storing server passwords inside a class. I was wondering if there is anyway around this problem.
20 years ago