This tutorial explains how to set up log4j with email, files and stdout. It compares XML to properties configuration files, shows how to change LogLevels for a running application. Furthermore, we explain best practices.
A method is a set of statements grouped together to perform a specific task. It is written to define the behavior of an object or a class. In object-oriented programming, a behavior is referred to as a message that one object sends to another object. Behavior is the only way by which an object can do anything.
This program will help you enhance your mouse event concepts in Java. As the title indicates you will be playing with a brush after you go through the tutorial.
In Java 1.5, Sun had decided to undeprecate the getEnv() method that provides the functionality to get the value of an enviroment variable. In addition, Sun has added a new method that allows you to discover all of the enviroment variables that are defined. This tutorial walks you through using both the old and new methods.
In our tutorial Using Google Web Services API, we discussed how to use the Java classes to access the Google Web API. In this tutorial, we will create a class that allows you to use the Google Web API for spell checking.
Google uses SOAP and WSDL standards to allow access from most programming languages. In addition to the SOAP access, Google has created a set of Java wrapper classes that encapsulates access to the Google Web APIs. This tutorial discusses the Java classes and the functionality of the Google web services.
Add more versatility to your existing Java framework. The same framework supports file access, network access, character conversion, compression, encryption and so forth. This article presents a framework that lets an application efficiently read data from a source that only supports writing data to an output stream.
Examine the roots of the double-checked locking idiom, why it was developed, and why it doesn't work. The Java programming language contains several useful programming idioms. It also contains some that further study has shown should not be used. Double-checked locking is one such idiom that should never be used.
Ant, from Jakarta project at the Apache Foundation, has become a de facto standard for building Java projects. You may already be using it to create automatic builds. It's easy enough to tailor those builds to your needs by customizing the build files; but what if you want to wait until run time to set certain properties? This article shows you how to extend Ant to produce builds that are interactive at run time; users can follow prompts to change parameters each time they conduct a build without having to deal with unfamiliar build files. You can incorporate this functionality into your builds to provide a smoother and more flexible experience for your end users.
The Java 2 Platform, Micro Edition (J2ME) offers great tools for developers, porting the Java platform's network-centric and platform-agnostic worldview down to memory- and processor-limited devices. This article explains the basics of the J2ME world, showing you the building blocks of the platform and demonstrating a sample application.
Java 2D may be the most obvious solution for programming 2D graphs in Java programs, but it's not the only one. This article proposes an elegant alternative in the form of Java Objects for Science (JSci), an open-source package that lets you create 2D bar graphs, pie charts, and line graphs in Swing.
One of the strengths of the Java platform is its object-oriented nature; one of the benefits of object-oriented languages is that they aid code reuse. But what if you're a Java programmer and you want to reuse code that wasn't written in the Java language? With Bridge2Java, an IBM alphaWorks technology, Java developers can integrate COM objects into their applications. This article explains how it works.
Project Jxta is a community-run attempt to build a utility application substrate for peer-to-peer applications. The initial reference implementation of Jxta includes a command-line shell that allows experimentation with the core Jxta platform without programming. This article takes us through a hands-on tour of the Jxta shell. You'll explore its command set and extend its capability by writing your own custom commands using the Java programming language.
Graphical and user interface capabilities have progressed in leaps and bounds since the early days of the Java language. The Java 2 platform contains a sophisticated cross-platform user interface architecture that consists of numerous high-level components, an advanced feature-rich device-independent graphics system, and a host of multimedia extensions. This article explores this progression, examines the capabilities of the current version 1.3 in detail, and looks to the future to see what release 1.4 will offer.
Neural nets may be the future of computing. A good way to understand them is with a puzzle that neural nets can be used to solve. Suppose that you are given 500 characters of code that you know to be C, C++, Java, or Python. Now, construct a program that identifies the code's language. One solution is to construct a neural net that learns to identify these languages. This article discusses the basic features of neural nets and approaches to constructing them so you can apply them in your own coding
This article shows you how to combine and leverage the best parts of Jiro technology and the Web-Based Enterprise Management (WBEM) initiative. Using familiar examples from the previous two articles of this column, this article introduces the WBEM client technologies for accessing and manipulating data in a CIMOM. It then shows you how to access the same data more elegantly and efficiently, by rearchitecting the Jiro management facade to act as the interface to the CIMOM. Finally, he talks about the need for greater standardization of Jiro management facades and discusses the future of management application programming under a combined Jiro and WBEM development platform
In the real world of everyday computing (and development), there are many situations where "whipping up a Java program" to perform a task is either impractical or too time consuming. This article takes you into the underground world of FESI (Free EcmaScript Interpreter), where deploying the Java language in a quick-and-dirty fashion is the norm rather than the exception. Article includes code snipets.
This is a continuation of the three-part series on building resource management applications. It takes a look at the Web-Based Enterprise Management (WBEM) initiative. WBEM serves to standardize the description and use of managed resources in enterprise networks. Follow along as the author describes the components that comprise WBEM, and practice using the technology with a simple filesystem example.
If you're looking for a unique programming challenge, try your hand at building a management application for a distributed, cross-platform network. This article is the first in a three-part series that looks at how Sun Microsystems's Jiro technology and the Distributed Management Task Force's Web-Based Enterprise Management Initiative (WBEM) can simplify the creation of management applications for heterogeneous environments.
If you want to build and run faster Java applications on the IBM Developer Kit for Linux, version 1.3, roll up your sleeves and prepare to get dirty. This article provides hands-on instruction for profiling, monitoring, and performance tuning not only your IBM Developer Kit, but your hardware capacity, the Linux 2.2.x kernel, and your Java applications.
GUIs are generally designed with a model-view-controller architecture in which the view is decoupled from the model. The separation presents a challenge to automated testing because it's difficult to verify that a state change in the model is reflected appropriately in the view -- it spawns the infamous "Liar View." This installment of Diagnosing Java Code examines the Liar View bug pattern.
If you've ever wanted to build your own supercomputer but have been held back by the demands of parallel programming in C, Pseudo Remote Threads is for you. This prize-winning Java programming model greatly simplifies parallel programming on clusters, bringing supercomputing out of the laboratory and into the hands of everyday Java programmers. Article includes code snipets
13 times | category:
this:1/125records total:23 Start Previous Next Last goto: