Archive for the 'Java' Category

XMLUtil

Saturday, April 8th, 2006

During the development of Impresario, we’ve built many many utilities to help us. One of the utility was the XMLUtil. The javax’s XML tutorial isn’t too helpful. We went through many hours of research and finally compiled a set of functions that allows us to convert strings to Documents, convert Documents to File, validate documents, […]

Prepared Statements, Again!

Tuesday, March 28th, 2006

Okay, earlier this year I figured out that the reason for our binary data problems when retrieving stored files from the database was the use of PreparedStatement. Well, we don’t use it for files, however we do still use it in so many other plaves in our code. We kept getting some recurring errors the […]

How to sign a Java Applet

Monday, February 20th, 2006

This is a tutorial on how to sign a Java Applet to allow it to bypass the security of the JVM. Here
Summary:
* To create a certificate:
keytool -genkey -alias myKeyAlias -keypass myKeypassword -keystore mykeystoreFileName.bin -storepass publicKeykeystorePassword
* To sign the applet (it has to be a .jar file):
jarsigner -keystore mykeystoreFileName.bin MyApplet.jar myKeyAlias
* To verify if the applet […]

Bloody MySQL

Sunday, February 12th, 2006

Well, some of you might know that we were planning on storing files in the database. I have been back and forwards with MySQL developerd for a cpl of months now with respect to an error I was having retrieving binary data from the database. All non text (as in writing) bytes would be […]

XML with Java 1.5

Thursday, January 5th, 2006

This is how you can validate an xml file with a xsd schema using the Java built-in libraries. Look for the sample code at the bottom of the page. After some painful hours, I found out that it doesn’t work with DTDs (although it says it does…). If you have a DTD, then refer to […]