| View: | [ 2009 | 2008 | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 ] |
| Articles Books Tips | Tutorials White Papers |
- Java theory and practice: Dynamic compilation and performance measurement by Brian Goetz - [Clicks: 22]
Writing and interpreting performance benchmarks for dynamically compiled languages, such as Java, is far more difficult than for statically compiled languages like C or C++. In this installment of Java theory and practice, Brian Goetz explores a few of the many ways in which dynamic compilation can complicate performance testing.
http://www-106.ibm.com/developerworks/library/j-jtp12214/ - Dec, 2004 - Plug-in to Reusability in Java by Keld H. Hansen - [Clicks: 14]
In this article Keld will uncover the secrets of "Plug-in Architecture," where parameterized classes are the plug-ins. We'll define Interfaces for several important classes used in an application, and then, we'll give the actual class names in a parameter file read by the application on start-up.
http://javaboutique.internet.com/tutorials/keldplugins/ - Dec, 2004 - URLs and URIs, Proxies and Passwords by Elliotte Rusty Harold - [Clicks: 7]
[O'Reilly Book Excerpts: Java Network Programming, 3rd Edition]
http://www.onjava.com/pub/a/onjava/excerpt/jvntwkprg_3e/index.html - Dec, 2004 - Integrating Macromedia Flex with Java by Mark Eagle - [Clicks: 18]
Mark Eagle shows how to combine Macromedia Flex with traditional Java web application development and deployment.
http://www.onjava.com/pub/a/onjava/2004/12/01/flexjava.html - Dec, 2004 - Juggle Your Java with JDistro by Howard Wen - [Clicks: 12]
Howard Wen interviews Guillaume Desnoix and Gérard Collin, creators of JDistro, which runs multiple applications, applets, etc., all within one JVM.
http://www.onjava.com/pub/a/onjava/2004/11/24/jdistro.html - Nov, 2004 - Simplify your application delivery with One-JAR by P. Simon Tuffs - [Clicks: 31]
If you've ever tried to deliver a Java application as a single Java Archive file (JAR file), you've most likely encountered the need to expand supporting JAR files before you build the final archive. As well as being a development nuisance, this can put you in violation of license agreements. In this article, Simon Tuffs introduces you to One-JAR, a tool that uses a custom classloader to dynamically load classes from JAR files inside an executable JAR file.
http://www-106.ibm.com/developerworks/java/library/j-onejar/ - Nov, 2004 - Gain SQL SELECT functionality in Java by David Rappoport - [Clicks: 24]
In "Filter Collections," David Rappoport described a simple way to filter collections of objects. In this article, he expands on this idea and shows you how to treat an array or a collection of objects the same way you treat a table in a relational database using SQL SELECT. He describes a generic mechanism for selecting, filtering, and sorting collections or arrays of objects. This mechanism allows you to apply SQL SELECT functionality to Java arrays or collections.
[Includes source code]
http://www.javaworld.com/javaworld/jw-11-2004/jw-1122-select.html - Nov, 2004 - Java Tech: Acquire Images with TWAIN and SANE, Part 1 by Jeff Friesen - [Clicks: 37]
Welcome to a three-part series that explores the TWAIN and SANE specifications for image acquisition, and presents TWAIN-based and SANE-based Java APIs that I created to support image acquisition in the Java world. Because the source code is freely available, you can customize those APIs as you see fit. In part one of this series, you begin to discover TWAIN. You then explore a very simple API that bridges the Java world with the TWAIN world: JTwain. Finally, you play with a simple Swing-based application that interacts with JTwain to select an image-acquisition device and acquire images from that device, to be displayed within a scrollable window: JTwainDemo.
[Includes sample code]
http://today.java.net/pub/a/today/2004/11/18/twain.html - Nov, 2004 - Dynamic Delegation and Its Applications by Lu Jian - [Clicks: 21]
The Dunamis project introduces Dynamic Delegation to extend the function of the Java Proxy reflection utility. It can generate delegation for both classes and interfaces at runtime. This article introduces Dynamic Delegation in brief with simple examples. In the real world, Dynamic Delegation can be used in many areas, such as mock objects in unit testing, Java GUI MVC framework, and more.
[Includes sample code]
http://www.onjava.com/pub/a/onjava/2004/11/17/dunamis.html - Nov, 2004 - Don't forget about memory. How to monitor your Java applications' Windows memory usage by Emma Shepherd, Martin Trotter, Caroline Maynard, Matthew Peters - [Clicks: 32]
Even though the Java runtime handles the bulk of memory management, keeping a vigilant eye on your programs' memory usage is still crucial to optimizing machine performance and spotting memory leaks. Numerous tools are available for monitoring memory usage in Windows. But each has its own advantages and disadvantages and its own particular slant -- often without defining clearly what it measures. The authors clear up a few common misconceptions about memory usage and demystify some of the many available tools, offering guidance on when and how to use them.
http://www-106.ibm.com/developerworks/library/j-memusage/?ca=dnt-546 - Nov, 2004 - Use Java to Interact with Your Clipboard by Kulvir Singh Bhogal - [Clicks: 14]
These days end users expect to use the ubiquitous "clipboard" concept as a transfer station for data, and if your applications don't support it, users won't be pleased. Learn how to use the java.awt.datatransfer package to cut, copy, and paste to a clipboard in Java.
[Includes source code]
http://www.devx.com/Java/Article/22326?trk=DXRSS_JAVA - Nov, 2004 - Access Windows Performance Monitor counters from Java, Part 1 by Nicholas Whitehead - [Clicks: 17]
Windows NT, 2000, 2003, and XP contain a utility called the Performance Monitor that provides a rich array of performance data on your hosts as well as the applications they support. However, accessing this data from Java is challenging. This article summarizes a method to reliably access this data in real time using a small but elegant Java API. A follow up to this article will describe how you can integrate these statistics into a Java Management Extensions (JMX) infrastructure and present the benefits that JMX provides.
http://www.javaworld.com/javaworld/jw-11-2004/jw-1108-windowspm.html - Nov, 2004 - Organize applications' multiple environment configurations by Paulo Caroli - [Clicks: 12]
This article introduces a mechanism for organizing application configuration parameters despite the number of runtime environments. This configuration mechanism is designed to systematize the arrangement and access of Java application configuration parameters. It is composed of interconnecting parts: configuration folder schema, configuration parameter reader, and launch command outline. After detailing each part of the configuration mechanism, author Paulo Caroli uses a comprehensive and illustrative Hello World application to demonstrate the mechanism.
http://www.javaworld.com/javaworld/jw-11-2004/jw-1108-config.html - Nov, 2004 - Create intelligent Web spiders by Mark O. Pendergast - [Clicks: 23]
Have you ever wanted to create your own database of Websites that meet specific criteria? Web spiders, sometimes referred to as Web crawlers, are programs that follow Web links from one site to another, examining content and recording locations. Commercial search sites use Web spiders to populate their databases; researchers can use spiders to find relevant information. Creating your own spider allows you to control the search for content, domains, and Webpage characteristics, such as text density and embedded multimedia content. This article shows you how to create your own powerful Web spider in Java using Java HTML and network classes.
[Includes source code]
http://www.javaworld.com/javaworld/jw-11-2004/jw-1101-spider.html - Nov, 2004 - Filter collections by David Rappoport - [Clicks: 20]
This article describes a simple mechanism for filtering collections based on a variable number of criteria. This mechanism could prove useful in a search mask that offers many search criteria that the user can either select or ignore.
[Includes source code]
http://www.javaworld.com/javaworld/jw-10-2004/jw-1018-filter.html - Oct, 2004 - Java programming gotchas by Vinoth K Anandan - [Clicks: 25]
This article explains some Java programming "gotchas" that application developers might overlook when writing software. Some of the gotchas described in this article may vary depending on the JVM implementation.
http://www.javaworld.com/javaworld/jw-10-2004/jw-1011-gotchas.html - Oct, 2004 - A Collection of JVM Options by Joseph D. Mocker - [Clicks: 15]
This document is a compilation of all the JVM options for various versions of the JVM on primarily SPARC/Solaris Platform. The descriptions for each option are taken mostly verbatim from the reference documents.
http://blogs.sun.com/roller/resources/watt/jvm-options-list.html - Oct, 2004 - Onward and Upward: Porting Apps to Higher JDK Versions by Rahul Kumar Gupta - [Clicks: 15]
Porting an existing Java-based application to a new JDK version is not as easy as many assume. Learn a comprehensive, systematic approach that can ensure a smooth process.
http://www.devx.com/Java/Article/22045 - Sep, 2004 - Clean Up Your Mess: Managing Temp Files in Java Apps by Michael Pilone - [Clicks: 11]
Creating and managing temporary files in a Java application can be a little tricky due to some open JVM bugs. Develop a workaround with some custom code and a clever design.
http://www.devx.com/Java/Article/22018 - Sep, 2004 - Garbage Collection in the Java HotSpot Virtual Machine by Tony Printezis - [Clicks: 12]
Gain a better understanding of how garbage collection in the Java HotSpot VM works, and learn to take full advantage of it when designing, developing, and deploying your Java applications.
http://www.devx.com/Java/Article/21977 - Sep, 2004 - Java Tech: The ABCs of Synchronization, Part 2 by Jeff Friesen - [Clicks: 12]
An exploration of Java's synchronization ABCs is not complete without coverage of thread communication, volatile variables, and synchronizer tools. This month, you'll learn how Java's waiting and notification mechanism supports thread communication, and explore a classic example of two threads communicating. You'll then discover volatile variables and find out how they are related to synchronization. Finally, you'll tour J2SE 5.0's high-level synchronizer tools.
http://today.java.net/pub/a/today/2004/09/15/sync2.html - Sep, 2004 - Understanding the Interplay Between Utility Classes and Static Initialization by Satya Komatineni - [Clicks: 18]
Problems that arise when static initializers are used, and assumed to run in a specific order, for utility purposes. A resource holder pattern can solve this.
http://www.onjava.com/pub/a/onjava/2004/09/15/statics.html - Sep, 2004 - Data structures: Make the right choice by Nick Williams - [Clicks: 19]
Selecting the most appropriate data structure to store your application's data is important. Your choice of data structure affects the operation and performance of your application -- sometimes with little consequence, sometimes dramatically. Examine a real-world problem that affected an application server product, the diagnosis, and the resolution that effectively improved performance twofold.
http://www-106.ibm.com/developerworks/web/library/wa-datastruc2.html - Sep, 2004 - Java validation with dynamic proxies by Eric Olson - [Clicks: 32]
Version 1.3 of the Java platform saw the introduction of the dynamic proxy facility. Dynamic proxies offer many interesting solutions to Java developers, including a validation scheme that easily decouples validation logic from an application's core business logic. In this article, Java developer Eric Olson shows you how dynamic proxies can keep your core application code free of validation routines and focused solely on business logic.
http://www-106.ibm.com/developerworks/java/library/j-dynproxies.html - Sep, 2004 - IRC Text to Speech with Java by Paul Mutton - [Clicks: 11]
This article will show you how to create a multi-platform IRC bot (an automated client) that uses the FreeTTS Java speech synthesizer library to convert IRC messages into audible speech.
http://www.onjava.com/pub/a/onjava/2004/09/08/IRCinJava.html - Sep, 2004 - Building Highly Scalable Servers with Java NIO by Nuno Santos - [Clicks: 16]
In this article, we describe the lessons we learned while designing and implementing our router, focusing on architectural issues such as I/O event dispatching, threading, management of client data, and protocol state. This is not an introductory article; the intended audience is developers that already have a basic knowledge of I/O multiplexing and Java NIO, but haven't yet used those technologies to develop a full-scale server. The article includes the source code for a echo server and client based on the architecture described. Both the server and the client are functional and can be complied and executed without any modification. The source code can also be used as a starting point to develop a full server.
[Includes source code]
http://www.onjava.com/pub/a/onjava/2004/09/01/nio.html - Sep, 2004 - Write Efficient Java Apps Using Native Data Structures with JNI by Greg Travis - [Clicks: 5]
Sometimes Java's data structures use too much memory to store the data you need to store. In such situations, you can use the JNI native code interface to access native data structures. Find out how to use the STL in C++ to implement a space-efficient hashtable that works like a regular Java hashtable.
[Includes sample code]
http://www.devx.com/Java/Article/21841 - Aug, 2004 - Processing command line arguments in Java: Case closed by Dr. Matthias Laux - [Clicks: 13]
This article describes the Options class, a helper class that helps process command line arguments for Java tools. Options offers a simple and convenient approach to define the acceptable syntax for such tools and then handles all the required syntax checks. Additional methods provide access to all the options' details and other data provided on the command line. This generic approach relieves the tool developer of the tedious task of developing and maintaining custom code that handles command line options for each tool.
[Includes source code]
http://www.javaworld.com/javaworld/jw-08-2004/jw-0816-command.html - Aug, 2004 - XML Persistence Pays Off by Kei G. Gauthier - [Clicks: 12]
Have you realized the full potential of the JavaBeans XML Persistence API in your projects? This technique lets you extend the API to use an XML-based persistence strategy for saving any object.
http://www.ftponline.com/javapro/2004_09/magazine/features/kgauthier/ - Aug, 2004 - Java Tech: The ABCs of Synchronization, Part 1 by Jeff Friesen - [Clicks: 13]
This article begins a two-part series that attempts to meet that challenge by exploring the fundamentals of Java's synchronization capabilities. It begins by introducing you to the concepts of monitors and locks. You next will learn how synchronized methods and synchronized statements implement those concepts at the language level. Finally, you will learn about deadlock, a nasty problem that often occurs when synchronizing threads.
http://today.java.net/pub/a/today/2004/08/02/sync1.html - Aug, 2004 - Build "Win-tuitive" Java Applications by Alexi Jordanov - [Clicks: 12]
You can make your cross-platform Java application more intuitive for Windows users. Learn how enabling access to the tray bar and programming your application to act as a Windows Service provides this functionality.
[Includes source code]
http://www.devx.com/Java/Article/21604 - Jul, 2004 - Functional programming in the Java language by Abhijit Belapurkar - [Clicks: 16]
If you work on large-scale development projects, then you're familiar with the advantages of writing modular code. Well-structured, modular code is easier to write, debug, understand, and reuse. The problem for Java developers is that the functional programming paradigm has long been implemented only via specialized languages such as Haskell, Scheme, Erlang, and Lisp. In this article, author Abhijit Belapurkar shows you how to use functional programming constructs such as closures and higher order functions to write well-structured, modular code in the Java language.
http://www-106.ibm.com/developerworks/java/library/j-fp.html - Jul, 2004 - Java Dynamic Proxies: One Step from Aspect-oriented Programming by Lara D'Abreo - [Clicks: 14]
Learn how to implement application concerns such as logging and remote error handling across classes using dynamic proxies. Along the way, you'll find out what dynamic proxies and aspect-oriented programming (AOP) have in common.
http://www.devx.com/Java/Article/21463 - Jul, 2004 - Improve Java Apps on Windows with a Native Launcher by Dan Lewis - [Clicks: 12]
What do IntelliJ Idea, Eclipse, and SmartCVS all have in common? If you said Java, you would be correct. But if you said that they all include a native launcher, you'd also be correct! They all include a native launcher for Windows. Why? The reasons fall into three categories: Integration, Deployment and Performance.
http://www.ociweb.com/jnb/jnbJul2004.html - Jul, 2004 - Eye on performance: Tuning garbage collection by Jack Shirazi, Kirk Pepperdine - [Clicks: 27]
If you're part of the current blogging craze, then you've likely heard of Blog-City, a blogging site owned and operated by Blog-City Ltd., a small company in Scotland. When some unexpected performance issues cropped up, Java performance experts Jack Shirazi and Kirk Pepperdine were asked to assist in a technical tuning of Blog-City. Their detective work was complicated by hardware constraints and communication channels (IRC, ftp, and the occasional e-mail) used throughout the project.
http://www-106.ibm.com/developerworks/java/library/j-perf06304/ - Jun, 2004 - Pinpoint Code Problems Using Java's Assertion Facility by Kulvir Singh Bhogal - [Clicks: 8]
Java developers have had the capability to include assertions in their code only since version 1.4. This article explains why, when, and how to use Java assertions to help you find and fix problems with your code -- before you deploy it.
[Includes source code]
http://www.devx.com/Java/Article/21416 - Jun, 2004 - Talk with me Java by Jeff Friesen - [Clicks: 8]
It is easy to make a Java applet and JavaScript code talk with each other. This article explores the mechanisms used to make bidirectional communications happen. In addition, you discover which of the Netscape Navigator and Internet Explorer Web browsers provides a better communications infrastructure.
[Includes source code]
http://www.javaworld.com/javaworld/jw-06-2004/jw-0621-talk.html - Jun, 2004 - Object equality by Alex Blewitt - [Clicks: 14]
In this article, Alex Blewitt describes the two most common methods in the Java language—equals() and hashCode()—and shows how they can be implemented correctly. The article also highlights the dangers of using instanceof in the equals() method.
[Includes source code]
http://www.javaworld.com/javaworld/jw-06-2004/jw-0614-equals.html - Jun, 2004 - Java shared classes by Lakshmi Shankar, Simon Burns, Roshan Nichani - [Clicks: 13]
In this article, IBM Java Technology Center Development Team members Lakshmi Shankar, Simon Burns, and Roshan Nichani discuss the concepts behind shared classes in JVMs, how they work, and how this technology could potentially be exploited by users. They also discuss some of the current implementations of this technology and how it may be further exploited in the future.
http://www-106.ibm.com/developerworks/java/library/j-shared/ - Jun, 2004 - Nested Classes, Part 3 by Robert Simmons - [Clicks: 12]
Robert Simmons concludes his quest to clarify the uses, advantages, and pitfalls to using Java's various nested classes with this week's third installment on the subject, excerpted from his book Hardcore Java. Robert covers static nested classes and how they differ from inner classes; double nested classes and whether and when to use them; and nested classes and interfaces and their usefulness, or lack thereof.
[O'Reilly Book Excerpts: Hardcore Java]
http://www.onjava.com/pub/a/onjava/excerpt/HardcoreJava_chap06/index2.html - May, 2004 - SSS (Small, Simple, Safe) by Alper Coskun - [Clicks: 8]
This article explored the "Small Simple Safe" tool. SSS is a simple, multi-platform, easy-to-use tool for teaching the Java framework and basic object-oriented concepts. Its main motivation is to solve problems beginners experience in understanding the difference between the framework and the language. It allows users to handle Java classes and objects directly in the GUI. SSS's design goals include simplicity, user-friendliness, and the ability to teach and to test standard libraries and other classes visually.
http://www.onjava.com/pub/a/onjava/2004/05/26/sss.html - May, 2004 - Java theory and practice: The exceptions debate by Brian Goetz - [Clicks: 11]
Most of the advice on the use of exceptions in the Java language suggests that checked exceptions should be preferred in any case where an exception conceivably might be caught. This suggestion is encouraged by both the language design (in that the compiler forces you to list in the method signature all checked exceptions that might be thrown) and in early writings on style and usage. Recently, several prominent writers have started to come to the position that unchecked exceptions may have more of a place in good Java class design than previously thought. In this article, Brian Goetz looks at the pros and cons of using unchecked exceptions.
http://www-106.ibm.com/developerworks/java/library/j-jtp05254.html - May, 2004 - Developing and Delivering Better Documentation with the JavaHelp System by Qusay H. Mahmoud - [Clicks: 24]
With JavaHelp technology, developers no longer need to invent their own help systems for each platform their application will run on. This article provides a tutorial and step-by-step instructions on how to use the JavaHelp system to deliver better help information for your software systems.
http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javahelp/index.html - May, 2004 - Eye on performance: Trash talk by Jack Shirazi, Kirk Pepperdine - [Clicks: 9]
Does your application generate out-of-memory errors on a regular basis? Do your users experience response times that are somewhat erratic? Does your application become unresponsive for fairly lengthy durations? Does your application performance appear sluggish? If you answered yes to any of these questions, then you could very well have a problem with garbage collection. Stay tuned while Jack Shirazi and Kirk Pepperdine of JavaPerformanceTuning.com explain how to identify garbage collection problems, and in doing so, help you to answer the question: Do you know what you garbage collector is up to?
http://www-106.ibm.com/developerworks/java/library/j-perf05214.html - May, 2004 - Nested Classes, Part 2 by Robert Simmons - [Clicks: 8]
Robert Simmons continues his efforts to clarify confusion over the use of nested classes in Java. In this week's installment, excerpted from Chapter 6 ( Nested Classes ) of Hardcore Java, Robert discusses the somewhat troublesome limited-scope inner …
[O'Reilly Book Excerpts: Hardcore Java]
http://www.onjava.com/pub/a/onjava/excerpt/HardcoreJava_chap06/index1.html - May, 2004 - Nested Classes, Part 1 by Robert Simmons - [Clicks: 9]
The use of nested classes in Java is a constant source of confusion for many programmers. Yet understanding nested classes is critical to such things as the proper implementation of UML composition relationships in Java. In addition, such understanding will help the professional developer unravel spaghetti code put out by other developers. In this first excerpt in a three-part series of excerpts from Chapter 6 ("Nested Classes") of my book, I cover the first of the three basic categories of nested classes--inner classes. Over the next two weeks I will cover limited-scope inner classes and static nested classes.
[O'Reilly Book Excerpts: Hardcore Java]
http://www.onjava.com/pub/a/onjava/excerpt/HardcoreJava_chap06/index.html - May, 2004 - Hacking Java libraries by Alex Kalinovsky - [Clicks: 13]
Sometimes situations arise where you must replace or patch an application class. In this article, an excerpt from Covert Java, Alex Kalinovsky explains what circumstances warrant such an approach and the appropriate way to patch a problem class.
http://www.javaworld.com/javaworld/jw-05-2004/jw-0510-patch.html - May, 2004 - Learn to speak Jamaican by James Jianbo Huang - [Clicks: 10]
Jamaica, the JVM Macro Assembler, is an easy-to-use assembly language for JVM bytecode programming. It uses Java syntax to define a JVM class, and, in method bodies, it takes bytecode instructions and Jamaica's built-in macros. All of Jamaica's bytecode instructions use mnemonics and symbolic names for variables, parameters, data fields, constants, and labels. Jamaica macros make JVM assembly programs shorter and easier to read. ... This article introduces you to the convenience of the Jamaica language.
http://www.javaworld.com/javaworld/jw-05-2004/jw-0503-jamaica.html - May, 2004 - Escaping Properties Purgatory - Part 1 by Stuart Halloway - [Clicks: 3]
In this article we have introduced the concept of a Component Configuration Interface (CCI). We have described four important elements of CCI design: structure, lookup, scope, and metadata. We have used these four elements to analyze three specific Java CCIs: JNDI, RMI, and Security. None of these CCIs are particularly compelling. More importantly, they are dissimilar from each other. Absent a standard, developers must learn each new CCI anew. Nonstandard CCIs lead to wasted time and wasted code, and they make configuration-related bugs more likely.
http://www.theserverside.com/articles/article.tss?l=dm_propertiesPurgatory - Apr, 2004 - Escaping Properties Purgatory - Part 2 by Stuart Halloway - [Clicks: 3]
In Part 2 we will: - Introduce XML as a configuration option; - Examine the weaknesses of current XML CCIs: the Preferences API and J2EE container configuration; - Propose a fresh start with a common CCI architecture for all Java components.
http://www.theserverside.com/articles/article.tss?l=dm_propertiesPurgatory&page=part2 - Apr, 2004 - Using Java Classes in Windows Batch Files by Thomas Kunneth - [Clicks: 10]
Although Java is an ideal language for implementing rich GUI applications, it is equally well-suited for the development of small console-based programs that, in turn, are predestined to be put together in shell scripts or batch files. In this article, I will discuss how to integrate Java classes and packages into Windows batch files.
http://today.java.net/pub/a/today/2004/04/30/cmdline.html - Apr, 2004 - Lend a helping hand to your Java applications by Nancy Chen Junhua - [Clicks: 22]
Even help system designers can use a helping hand sometimes, and with JavaHelp 2.0, help is finally available. In this article, you'll learn how to use the Java platform's unique help system API to build a standard, full-featured, easy-to-use system for presenting online information to Java application users.
[Includes source code]
http://www-106.ibm.com/developerworks/java/library/j-javahelp2/ - Apr, 2004 - Do As They Need, Not As They Say by Jeff Lowery - [Clicks: 6]
In this article, I would like to address some of the difficulties involved in replacing an existing client system with a completely new one. Having gone through this process several times in my career, there are some lessons I have learned that can make this transition easier for the end user. The key is not to take an initial set of requirements at face value, but to work with the future users of the new system (in conjunction with their management) to make sure what's delivered is what's needed.
http://www.onjava.com/pub/a/onjava/2004/04/28/users.html - Apr, 2004 - Seven Low-Cost Ways to Improve Legacy Code by Robert Simmons - [Clicks: 5]
This article presents seven techniques I've developed and used in my consulting work that are designed to improve legacy code. You can apply some of these techniques using either freely available tools or with scripts. You'll apply the others manually, but they shouldn't represent a significant investment in time. Be forewarned, however, that all of these techniques may reveal other issues in the code base, such as hidden bugs, which could take a significant amount of time to fix.
http://www.onjava.com/pub/a/onjava/2004/04/28/hardcorejava.html - Apr, 2004 - Java theory and practice: Coaxing J2EE out of the container by Brian Goetz - [Clicks: 22]
Most projects fall squarely into either the category of J2EE application or J2SE application. However, there are a number of J2EE technologies that can exist outside of the J2EE container, and some J2SE applications may benefit from them. This month, Brian Goetz looks at how some J2EE services can be used in J2SE applications.
http://www-106.ibm.com/developerworks/java/library/j-jtp04204.html - Apr, 2004 - JSR 133 in Public Review by Brian Goetz - [Clicks: 11]
JSR 133, which was charged with fixing the problems discovered in the Java Memory Model (JMM), has recently entered public review after nearly three years in committee. The new memory model strengthens the semantics of volatile and final, largely to bring the language semantics into consistency with common intuition.
http://today.java.net/pub/a/today/2004/04/13/JSR133.html - Apr, 2004 - Using Program Parameters in Java by Keld H. Hansen - [Clicks: 70]
Each of us, as Java programmers will encounter situations where choices must be made between various coding solutions. Should tabular data be sorted in one way or another? What exactly is the graphical layout of your HTML pages? How often should you poll a queue? To better understand what choices to make Keld discusses the various ways you may enter parameters to your Java programs.
[Jakarta Commons. CLI : Command Line Interface]
http://javaboutique.internet.com/tutorials/java_param/ - Apr, 2004 - Java theory and practice: Fixing the Java Memory Model, Part 2 by Brian Goetz - [Clicks: 14]
In Part 1 of this series, columnist Brian Goetz focused on some of the serious flaws that were found in the original JMM, which resulted in some surprisingly difficult semantics for concepts that were supposed to be simple. This month, he reveals how the semantics of volatile and final will change under the new JMM, changes that will bring their semantics in line with most developers' intuition. Some of these changes are already present in JDK 1.4; others will have to wait until JDK 1.5.
http://www-106.ibm.com/developerworks/java/library/j-jtp03304/ - Mar, 2004 - Lisp and Java by Dan Milstein - [Clicks: 5]
First-class functions are a powerful feature of the Lisp programming langauge. This article describes some ways they can be used, and explores how to approximate them in Java.
http://www.onjava.com/pub/a/onjava/2004/03/24/lisp.html - Mar, 2004 - Eye on performance: MegaJogos scales up with NIO by Jack Shirazi, Kirk Pepperdine - [Clicks: 13]
Marcos Fonseca, the main man behind the MegaJogos multi-player game site and a member of the Java Games community, recently altered the application behind the site to use the NIO package to enhance its scalability. Though successful, the migration was not without its challenges. In this installment of Eye on performance, Kirk Pepperdine and Jack Shirazi follow Marcos's journey as he discovers some of the finer points of NIO performance.
http://www-106.ibm.com/developerworks/library/j-perf03174.html - Mar, 2004 - At Your JavaService: Run Your Java Programs as Microsoft Windows Services by Kulvir Singh Bhogal - [Clicks: 21]
Java programs are made to run in the JVM, but unfortunately that leaves them with no hooks into the OS. To address those times when it's useful to run a Java program as a Windows NT/2000 Service, a free utility called JavaService comes to the rescue.
http://www.devx.com/Java/Article/20456 - Mar, 2004 - Java APIs for Bioinformatics by Stephen Montgomery - [Clicks: 4]
An introduction to Java APIs for bioinformatics. This article includes usage information, examples, and current design challenges for API developers in the life sciences field.
http://www.onjava.com/pub/a/onjava/2004/03/10/bioinf.html - Mar, 2004 - Design cross-platform Java UIs with native performance by Vladimir Silva - [Clicks: 10]
Can you write Java code that compiles across several platforms but still performs as fast as native code? This is a problem that has vexed Java developers, particularly when it comes to applications with complex UIs. In this article, developer Vladimir Silva proposes an interesting solution to this problem. You'll learn how to use JNI to access SLIK, a cross-platform C API that offers native performance on both Windows and UNIX.
[Includes source code]
http://www-106.ibm.com/developerworks/library/j-slik/index.html - Mar, 2004 - Using Java to Prevent Attacks by Adam Kolawa, Gina Assaf, Roberto Scaramuzzi - [Clicks: 12]
Beginning with this article, Java Pro Online will be posting a series of weekly article briefs that offer rules for preventing attacks to Java systems as well as ensuring that Java applications are secure. The discussion here provides two rules for the prevention of attacks. Look for upcoming rules for ensuring Java applications are secure. We will post a new rule each week.
http://www.ftponline.com/javapro/2004_03/online/web_akolawa_03_03_04/ - Mar, 2004 - Java theory and practice: Fixing the Java Memory Model, Part 1 by Brian Goetz - [Clicks: 7]
JSR 133, which has been active for nearly three years, has recently issued its public recommendation on what to do about the Java Memory Model (JMM). Several serious flaws were found in the original JMM, resulting in some surprisingly difficult semantics for concepts that were supposed to be simple, like volatile, final, and synchronized. In this installment of Java theory and practice, Brian Goetz shows how the semantics of volatile and final will be strengthened in order to fix the JMM. Some of these changes have already been integrated in JDK 1.4; others are slated for inclusion in JDK 1.5.
http://www-106.ibm.com/developerworks/library/j-jtp02244.html - Feb, 2004 - Designing a Broadcast Messenger Using Socket Programming in Java by Fatima Saffano - [Clicks: 18]
Create a server that is responsible for receiving and responding to messages that are received on the network.
[Includes demo project]
http://www.developer.com/java/other/article.php/3315501 - Feb, 2004 - Eye on performance: Exceptions to exceptions by Jack Shirazi, Kirk Pepperdine - [Clicks: 24]
Java performance enthusiasts Jack Shirazi and Kirk Pepperdine, Director and CTO of JavaPerformanceTuning.com, follow performance discussions all over the Internet to see what's troubling developers. In this month's stop at the JavaRanch, they counter the campfire stories about exceptions with a detailed look at the story behind the story.
http://www-106.ibm.com/developerworks/library/j-perf02104.html - Feb, 2004 - Java theory and practice: Garbage collection and performance by Brian Goetz - [Clicks: 17]
The past two installments of Java theory and practice have discussed various techniques for garbage collection and the basics of the JDK 1.4.1 garbage collectors. This month, columnist Brian Goetz looks at the performance impact of the choice of collector, how various coding idioms interact with the garbage collector, and how allocation and other related costs have changed in Java virtual machines over the past several years. Share your thoughts on this article with the author and other readers in the accompanying discussion forum.
http://www-106.ibm.com/developerworks/library/j-jtp01274.html - Jan, 2004 - The java.util.concurrent tools by Ryan Brase - [Clicks: 17]
Developers who've been using Doug Lea's concurrency tools know what a boon they are for building multi-threaded apps in Java. Soon all Java developers will benefit from his work--read how this library is going to simplify your multi-threaded development.
http://builder.com.com/5173-6370-0.html - Jan, 2004
- Decompiling Java
by Godfrey Nolan - [Clicks: 14]
Both Java and .NET use the idea of a "virtual machine," or VM. And while VMs are useful for some purposes, they undermine the security of your source code, because creation can be reversed, or “decompiled.” Which makes this one-of-a-kind book extremely useful: you must understand decompilation, to properly protect your intellectual property. For example, how secure is your code after you run an obfuscator? The book will answer questions like this, and provide more thorough information about Java byte codes and the Java Virtual Machine (JVM) than any other book on the market. This book redresses the imbalance by providing insights into the features and limitations of today's decompilers and obfuscators, and offering a detailed look at what JVM's actually do.
Apress, Hardcover - Jul, 2004 - Hardcore Java
by Robert Simmons - [Clicks: 13]
Hardcore Java is an advanced book that focuses on the little-touched but critical parts of the Java programming language that expert programmers use. We're not talking about trivial things; we're talking about difficult but extremely powerful and useful programming techniques like reflection, advanced data modeling, advanced GUI design, and advanced aspects of JDO, EJB and XML-based web clients. This unique book reveals the true wizardry behind the complex and often-mysterious Java environment.
O'Reilly Media, Inc., Paperback - Mar, 2004
- Understanding Rendering Hints by John Zukowski - [Clicks: 17]
One of the ways you can perform drawing-related tasks with the standard Java libraries is through the Graphics object. By passing a Graphics object into the paint() and paintComponent() method of your component, you can draw with methods such as drawLine, drawRect, and drawOval. These Graphics-based operations are fairly basic -- they typically draw with a single color on a line that is a single pixel wide.
http://java.sun.com/developer/JDCTechTips/2004/tt0518.html#1 - May, 2004 - Rule 10: Make Classes, Fields, Methods Private by Adam Kolawa, Gina Assaf, Roberto Scaramuzzi - [Clicks: 15]
Java Pro Online presents a weekly rule for ensuring the security of Java systems. Here are Rules 10 and 11 for beginning your strategy for ensuring your Java applications are secure.
http://www.ftponline.com/javapro/2004_05/online/rule10_05_12_04/ - May, 2004 - Rule 9: Don't Store User-Given Mutable Objects by Adam Kolawa, Gina Assaf, Roberto Scaramuzzi - [Clicks: 4]
Java Pro Online offers a weekly rule for beginning your strategy to ensure your Java code is secure. Rule 9 is don't directly store user-given mutable objects.
http://www.ftponline.com/javapro/2004_05/online/rule9_05_05_04/ - May, 2004 - Rule 8: Don't Return References to Mutable Objects by Adam Kolawa, Gina Assaf, Roberto Scaramuzzi - [Clicks: 7]
Java Pro Online offers a weekly rule for beginning your strategy to ensure your Java code is secure. Rule 8 is don't return references to mutable objects; otherwise, clone first.
http://www.ftponline.com/javapro/2004_04/online/rule8_04_28_04/ - Apr, 2004 - Rule 7: Do Not Depend on Package Scope by Adam Kolawa, Gina Assaf, Roberto Scaramuzzi - [Clicks: 12]
Java Pro Online offers a weekly rule for beginning your strategy to ensure your Java code is secure. Rule 7 is to not depend on package scope.
http://www.ftponline.com/javapro/2004_04/online/rule7_04_21_04/ - Apr, 2004 - Rule 6: Make Classes Nonserializable by Adam Kolawa, Gina Assaf, Roberto Scaramuzzi - [Clicks: 11]
Java Pro Online presents a weekly rule for ensuring the security of Java systems. Here's Rule 6 for beginning your strategy for ensuring your Java applications are secure.
http://www.ftponline.com/javapro/2004_04/online/rule6_04_14_04/ - Apr, 2004 - Rule 5: Make Your clone () Method Final by Adam Kolawa, Gina Assaf, Roberto Scaramuzzi - [Clicks: 14]
Java Pro Online presents a weekly rule for ensuring the security of Java systems. Here's Rule 5 for beginning your strategy for ensuring your Java applications are secure.
http://www.ftponline.com/javapro/2004_04/online/rule5_04_07_04/ - Apr, 2004 - Rule 4: Make Your Classes Noncloneable by Adam Kolawa, Gina Assaf, Roberto Scaramuzzi - [Clicks: 13]
Java Pro Online presents a weekly rule for beginning your strategy to ensure your Java code is secure. Rule 4 is to make your classes noncloneable by defining a final method clone.
http://www.fawcette.com/javapro/2004_03/online/rule4_03_31_04/ - Mar, 2004 - Rule 3: Avoid Comparing Class Objects by Name by Adam Kolawa, Gina Assaf, Roberto Scaramuzzi - [Clicks: 12]
Java Pro Online presents a weekly rule for beginning your strategy to ensure your Java code is secure. Rule 3 is to avoid comparing class objects by name.
http://www.fawcette.com/javapro/2004_03/online/jp_akolawa_03_24_04/ - Mar, 2004 - Rule 2: Make Inner Classes Private by Adam Kolawa, Gina Assaf, Roberto Scaramuzzi - [Clicks: 6]
Ensure your inner classes are private if using them is necessary.
http://www.ftponline.com/javapro/2004_03/online/rule2_03_17_04/ - Mar, 2004 - Best Practices in Exception Handling by John Zukowski - [Clicks: 18]
Exception handling is a built-in aspect of the Java programming language. The concept of handling error cases with exceptions is designed to make code more reliable and easier to maintain and read. This tip looks at some best practices for dealing with and handling exceptions.
http://java.sun.com/developer/JDCTechTips/2004/tt0316.html#2 - Mar, 2004 - Rule 1: Avoid Using Inner Classes by Adam Kolawa, Gina Assaf, Roberto Scaramuzzi - [Clicks: 15]
Take the first step in a set of guidelines that can help you begin a strategy to ensure your Java code is secure.
http://www.ftponline.com/javapro/2004_03/online/rule1_akolawa_03_10_04/ - Mar, 2004 - 10 Tips to Maximize Information Delivery by John E. Gularson - [Clicks: 11]
Evaluating reporting solutions is challenging, and errors are costly. Here are ten vital tips to consider when investing in an enterprise reporting solution for your organization.
http://www.ftponline.com/javapro/2004_02/online/jgularson_02_18_04/ - Feb, 2004 - Reflecting JavaBeans Components by John Zukowski - [Clicks: 9]
A JavaBeans component, also known as a JavaBean, is designed to be visually manipulated in graphically-oriented tools such as an IDE. A JavaBean is a Java class that defines properties, has methods, and identifies events that it fires and to which it responds. The names of the methods in the class specify the properties. If you create the class appropriately, an IDE such as Java Studio will recognize the properties and events, and allow you to graphically program using the JavaBean.
http://java.sun.com/developer/JDCTechTips/2004/tt0217.html#2 - Feb, 2004
- Introduction to Java programming by Roy Miller - [Clicks: 28]
The Java language, and the ever-growing Java platform, have revolutionized programming. The goal of this tutorial is to introduce you to the Java syntax you're most likely to encounter professionally, and to expose you to idioms that will help you avoid trouble. Follow along with Java professional Roy Miller as he guides you through the essentials Java programming, including the OOP paradigm and how it applies to Java programming; Java language syntax and use; creating objects and adding behavior, working with collections, handling errors; and tips for writing better code.
[Formats: HTML, PDF, Zip]
http://www-106.ibm.com/developerworks/edu/j-dw-java-intjava-i.html?S_TACT=104AHW02 - Nov, 2004
- Exploiting the Java Virtual Machine by Brian Maso - [Clicks: 9]
Java application and component developers have a tendency to rely on a popular fiction known as the "vanilla VM configuration." The choice to rely on the VM to provide adequate, scalable runtime facilities for "real world" applications is often made out of lack of understanding, not expediency. This white paper demonstrates why Java developers need a non-trivial understanding of their runtime environment, the Java VM, by illustrating how some of the most common Java development assumptions can be harmful to a real-world Java application. As a concrete example, this paper addresses why relying on the system classpath is not a good idea in several different scenarios.
http://www.theserverside.com/articles/article.tss?l=dm_jvm - Apr, 2004 - (PDF) - Java Protocol Handlers by Brian Maso - [Clicks: 15]
This paper describes for you everything you need to know to exploit the java.net.URL custom plug-in architecture. It covers the java.net.URL architecture and how different java.net package objects interact to resolve URLs into resource streams. Knowing the architecture you'll see how to build your own protocol handlers, which involves (at a minimum) providing a concrete implementation of two important java.net packet classes: java.netURL.StreamHandler and java.net.URLConnection. You'll then see some tricks about deploying them in real-world Java execution environments.
http://www.theserverside.com/articles/article.tss?l=dm_protocolHandlers - Apr, 2004 - (PDF) - Know What You Are Executing: Finding a list of Loaded Classes by Ted Neward - [Clicks: 12]
Understanding what version of your code is executing in production can be the difference between a solved bug and an embarrassing admission of ignorance. Too many times developers are caught up defending code that isn't properly migrated out to Production or a customer's machine. In some extreme cases, developers (and/or tech support staff) are expected to support code on client machines with no idea of precisely what version of the code is running there. Add to this mess the usual variety of patches, minor version releases and daily builds, and you have a recipe for complete disaster, both from a personal and professional standpoint.
http://www.theserverside.com/articles/article.tss?l=dm_loadedClasses - Apr, 2004 - (PDF) - Understanding Class.forName() - Java by Ted Neward - [Clicks: 11]
Dynamic loading of Java classes at runtime provides tremendous flexibility in the development of enterprise systems. It provides for the basis of "application servers", and allows even simpler, lighter-weight systems to accomplish some of the same ends. Within Java, dynamic-loading is typically achieved by calling the forName method on the class java.lang.Class; however, when Class.forName is called from within an Extension, strange errors can occur. This paper describes why those errors occur, and how Java2 provides a facility, called the "Thread context ClassLoader", to avoid them.
http://www.theserverside.com/articles/article.tss?l=dm_classForname - Apr, 2004 - (PDF)