Archive for the 'Java' Category

Speed up Swing GUI Java Apps

I was writing a small database application using Java and Apache Derby in Netbeans. Soon, felt that the speed should be improved as it was slow compared to a c++ or python app.
There are a few tweaks which could give significant improvement in the speed of a swing gui application.

Install Apache Tomcat 5.5 on Ubuntu 8.04 Hardy Heron

To install and run Tomcat on Ubuntu (8.04 over here) the following packages should be installed from synaptic :
1. tomcat5.52. tomcat5.5-webapps3. sun-java6-jdk
They can be installed from command line using the command sudo apt-get

Execute an SQL Script in JDBC

The SQL Script should have comments starting with – or — only on new lines and each command should end with a ; .
Reading a sql file and putting all of it in a string variable and feeding to the execute command would result in an exception. All instructions must be executed individually. A proper [...]

Reading Writing and Saving Configurations to a File in Java

Configuration files are used in applications to store settings, user preferences and other configuration parameters of an application so that. When configurations are changed from within the application these need to be saved so that next time the application starts with these new settings.