The standard J2SE platform libraries include a reflection API. This API allows classes to reflect on themselves, to see their inner selves. Typically not used by developers, but by tool developers such as those creating an IDE like NetBeans, the reflection API lets you discover the names of classes, methods, and fields.
People who aren't familiar with XP are bothered by the concept of just-in-time (JIT) design -- designing and implementing what you know you need right now and not worrying about future design issues until absolutely necessary. While this approach might seem unwise or even reckless, XP advocate Roy Miller wraps up his series by showing you how safe and easy JIT design is -- and how it just might revolutionize the way you write code.
As the J2EE platform has matured, it has opened up the opportunity to deploy commodity servers in networked cluster configurations for scaling of Web services and Web applications at the Web tier. These commodity servers, interconnected through commodity LAN hardware, can provide cost-effective clustering solutions. The last piece of the clustering puzzle is in the software. In this seriesSing Li examines three open source software substrates that can enable high-impact Web tier clustering, beginning with JavaGroups
This article discusses incremental compaction, a new feature in the memory management component of IBM JDK 1.4.0. Incremental compaction is a way of spreading compaction work across different garbage collection cycles, thereby reducing pause times. The authors discuss the need for incremental compaction, the compaction phases at a high level, and some runtime parameters. They also explain how to interpret changes in the verbosegc output
Love or hate it, static type checking can make code more robust. Programming languages are moving away from static type checking, but it is too powerful a debug resource to abandon. Static type checking can be one of the key weapons in a powerful arsenal against introducing and for detecting bugs. This article explains why we should be glad that the Java language supports it, and discusses how it can be made even better.
Learn the pros and cons of generating native code from Java source. This article includes the basics of code compilation, including a brief overview of why many developers are employing Java native compilers for their applications.
The ThreadLocal class appeared with little fanfare in version 1.2 of the Java platform. While support for thread-local variables has long been a part of many threading facilities, such as the Posix pthreads facility, the initial design of the Java Threads API lacked this useful feature. Further, the initial implementation was quite inefficient. For these reasons, ThreadLocal gets relatively little attention, but it can be very handy for simplifying the development of thread-safe concurrent programs. This article examines ThreadLocal and offers tips for exploiting its power.
The addition of the java.util.prefs package to Java 1.4 (through JSR 10) lets you manipulate user preference data and configuration data by providing you with access to an implementation-specific registry (for example, the Windows Registry on Windows platforms). This article introduces you to the Preferences class and walks you through its use. It puts it all together with a sample program.
Many algorithms are expressed most concisely as tail-recursive methods. Compilers can automatically transform such methods into loops and thereby improve program performance, but this transformation is not required by the Java language specification, so not all JVMs will perform it. This means that tail-recursive methods in the Java language can result in unexpectedly large memory usage. This article demonstrates that dynamic compilation maintains the language's semantics while static compilation often doesn't. Learn why this matters and get a bit of code to help you determine whether your just-in-time (JIT) compiler can transform tail recursion on code while preserving semantics.
You inevitably spend some part of your week crunching code that you didn't write, and for which you may not have the source. This beginner's guide to opening up and locking down Java code walks you through the essentials of disassembling, decompiling, and obfuscating Java code, using examples from popular tools such as Mocha, HoseMocha, jmangle, and JODE.
8 times | category:
this:1/125records total:12 Start Previous Next Last goto: