Tag Archives: Source code

Frequently Asked Questions in Java Part-5

Question: There are two classes: A and B. The class B need to inform a class A when some important event has happened. What Java technique would you use to implement it? Answer: If these classes are threads I’d consider … Continue reading

Posted in Java | Tagged , , , , , , , , , , | 1 Comment

Writing Custom Task in Ant

Writing Own Task Create a Java class that extends org.apache.tools.ant.Task For each attribute, write a setter method that is public void and takes a single argument Write a public void execute() method, with no arguments, that throws a BuildException — … Continue reading

Posted in Ant, How To..., Java | Tagged , , , , , , , , , , , , , | 4 Comments

Built-in Tasks in Ant

Java™ Application Development on Linux® – Free 599 Page eBook Enterprise Java Virtualization: Understanding the TCO Implications InfoWorld’s Java IDE Comparison Strategy Guide: Java Essential Training Apache Jakarta Commons: Reusable Java™ Components Enabling Rapid ROI: With Java™ – Based Business … Continue reading

Posted in Ant, Java | Tagged , , , , , , , , , , , , , , | 3 Comments

RPM Installation: can’t create transaction lock on /var/lib/rpm/__db.000

When you need to install RPM package in Redhat and you get the following error: Login with su and try to run the RPM command and the problem will be solved.  

Posted in Redhat | Tagged , , , , , , , | Leave a comment

Creating, Compiling and Running a Simple program in Java

Now that we know how to create classes, objects, and class and instance variables and methods let’s put it together to create a Java application. Applications, are Java programs that run on their own. A Java application consists of one … Continue reading

Posted in Java | Tagged , , , , , , , , , , , , , , | 4 Comments

Threads in Java

Defining Threads: A thread, or execution context, is considered to be encapsulation of a virtual CPU with its own program code and data. Relation of a Process and a Thread: Process is a program in execution. One or more threads … Continue reading

Posted in Java | Tagged , , , , , , , , , , , , , | 2 Comments

Exceptions in Java

An exception is an abnormal condition that arises in a code sequence at run-time. Exception is a run-time error. Exceptions are Java objects. All exceptions are derived from java.lang.Throwable class. A checked exception is a sublcass of Throwable but not … Continue reading

Posted in Java | Tagged , , , , , , , , , , , , , , | 1 Comment