Archive for April, 2008

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.