Java

Using JavaSVN beta with Subclipse

Why ?


The beta version of JavaSVN (1.1.0 beta 4) has support for the file:// protocol.

Prerequisite


# Eclipse 3.x
# Install the latest version of subclipse.
# Donwload the standalone release ot JavaSVN 1.0.1 Beta 4.

Install


Copy ganymed.jar and javasvn.jar from the JavaSVN beta zip to /plugins/org.tigris.subversion.subclipse.core_1.0.3/lib overwriting files with the same name.

Use PC Speaker from Java

Getting the PC speaker to emit a annoying beep might seem to be a quite easy task. And it is provided that you are in a graphical environment such as X.org och MS Windows™. Then using this easy bit of code will do:

package beeptest;

import java.awt.Toolkit;

public class BeepTest {
        public static void main(String[] args) {
                try {
                        Toolkit.getDefaultToolkit().beep();
                } catch (Exception e) {
                        e.printStackTrace();
                }
        }
}

JUCpio

Project summary


!SVN

What is JUCpio ?

JUCpio stands for Java Util CPIO and is a set of classes (a API) for reading and writing cpio files.

It is designed to be similar to java.util.zip.

The primary reason I started this project was to learn more about the CPIO file format. The API is currently in a very early stage of development.

Features


Implemented


* Gives a interface to extract data from cpio files.

Digest The Tortoies And The Hare

The Tortoies And The Hare


I was looking for a API that could help me create a data driven model for a application I was writting at work. Since it was a Java application I turned my eyes towards Jakarta (a true saviour for us Java coders) and found Jakarta Digester. It seemed to full fill all that I needed. So I took it for a spin.

Log4j

Introduction

Log4J is a logging framework developed as part of the Jakarta project and distributed under the Apache Sowtware Licens. The Log4J framework gives you a fully configurable logging environment for your applications. It can easily be configured through code in your program or using configuration files.

The basic architecture of Log4J consists of 3 main components:

JDBCInfo

Here is a small Java application which connects to a database using JDBC and prints some information.

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;

public class JDBCInfo {
    private Connection conn;
   
    public JDBCInfo(String driver, String url) {
        if (driver != null) {
            try {
                Class.forName(driver);
                System.out.println("Registered JDBC driver '" + driver + "'");
            } catch (ClassNotFoundException e) {

Syndicate content