4/25/2007

Standard options recognized by the Java HotSpot VM are described on the Java Application Launcher reference pages for Windows, Solaris and Linux. This document deals exclusively with non-standard options recognized by the Java HotSpot VM:

Options that begin with -X are non-standard (not guaranteed to be supported on all VM implementations), and are subject to change without notice in subsequent releases of the JDK.Options that are specified with -XX are not stable and are not recommended for casual use. These options are subject to change without notice.

Some Useful -XX Options

Default values are listed for Java SE 6 for Solaris Sparc with -server. Some options may vary per architecture/OS/JVM version. Platforms with a differing default value are listed in the description.

Boolean options are turned on with -XX:+

and turned off with -XX:-

.Numeric options are set with -XX:

=. Numbers can include 'm' or 'M' for megabytes, 'k' or 'K' for kilobytes, and 'g' or 'G' for gigabytes (for example, 32k is the same as 32768).String options are set with -XX:

=, are usually used to specify a file, a path, or a list of commandsFlags marked as manageable are dynamically writeable through the JDK management interface (com.sun.management.HotSpotDiagnosticMXBean API) and also through JConsole. In Monitoring and Managing Java SE 6 Platform Applications, Figure 3 shows an example. The manageable flags can also be set through jinfo -flag.

The options below are loosely grouped into three categories.

Behavioral options change the basic behavior of the VM.Performance tuning options are knobs which can be used to tune VM performance.Debugging options generally enable tracing, printing, or output of VM information.

-XX:+UseLargePages Use large page memory. (Introduced in 5.0 update 5.) For details, see Java Support for Large Memory Pages.

-XX:+UseMPSS Use Multiple Page Size Support w/4mb pages for the heap. Do not use with ISM as this replaces the need for ISM. (Introduced in 1.4.0 update 1, Relevant to Solaris 9 and newer.) [1.4.1 and earlier: false]

4/06/2007

At Google our mission is to organize the world's information and make it useful and accessible to our users. But any piece of information's usefulness derives, to a depressing degree, from the cognitive ability of the user who's using it. That's why we're pleased to announce Google Gulp (BETA)™ with Auto-Drink™ (LIMITED RELEASE), a line of "smart drinks" designed to maximize your surfing efficiency by making you more intelligent, and less thirsty.

Think fruity. Think refreshing. Think a DNA scanner embedded in the lip of your bottle reading all 3 gigabytes of your base pair genetic data in a fraction of a second, fine-tuning your individual hormonal cocktail in real time using our patented Auto-Drink™ technology, and slamming a truckload of electrolytic neurotransmitter smart-drug stimulants past the blood-brain barrier to achieve maximum optimization of your soon-to-be-grateful cerebral cortex. Plus, it's low in carbs! And with flavors ranging from Beta Carroty to Glutamate Grape, you'll never run out of ways to quench your thirst for knowledge.

By convention, the first part of the package name is the Internet domain name of the class creator, reversed. And thatz why we see many packages starting with com and org...!

Since the Internet domain names are unigue you should follow this agreement. Do not use the package name that already match some domain name that you are not owner of. Find free name and register it. You can find cheap registration now on Internet, ~$10/year!

I'am sure that in my program I create 100 new threads and when I use isAlive method it shows often less than 100 threads... I have not killed even one of them!

Good, short and clear explanation I found in Java tutorial on SUN's site:

"The API for the Thread class includes a method called isAlive. The isAlive method returns true if the thread has been started and not stopped. If the isAlive method returns false, you know that the thread either is a New Thread or is Dead. If the isAlive method returns true, you know that the thread is either Runnable or Not Runnable. You cannot differentiate between a New Thread or a Dead thread. Nor can you differentiate between a Runnable thread and a Not Runnable thread."

I have written lines of code with mathematical operators...but i always wonder about shiFters (Shift Operators...Bingo!)...Why do we need it...? watz the use...? Read on...1. Make faster integer division/multiplication operations:

4839534 * 4can be done like this:4839534 << 2

or

543894 / 2can be done like this:543894 >> 1

Shift operations much more faster than multiplication for most of processors.

2. Reassembling byte streams to int values 3. For accelerating operations with graphics since Red, Green and Blue colors coded by separate bytes. 4. Packing small numbers into one single long...

4/02/2007

Which4J is a simple utility app that helps you determine where classes are being loaded from. This can be especially helpful in debugging classpath and classloader problems. It serves the same general purpose as the Unix which command except it searches your classpath (or a particular classloader) instead of your shell command path.

Which4J can be run in command-line mode to search your system classpath for all occurrences of the specified classname. More importantly, it can also be used programmatically to search a particular ClassLoader for the first occurrence of the specified classname or Class instance. This can be extremely valuable when trying to debug problems in web containers and application servers that have sophisticated ClassLoader hierarchies.

The following snippet of code shows how simple it is to figure out where a particular classloader is loading a particular class from:

4/01/2007

Are these self explanatory to someone whoz new to computers?if no read on...

We understand what 404 means: Page Not Found. But the average internet user has no idea what 404 means or what to do about it. To them, it's yet another unintelligible error message from the computer. Most 404 pages are unvarnished geek-speak.

One of the best error pages I've ever seen is/was from Dunstan's 1976 Design blog . I think it hits most of your points for a good error page, although it doesn't automatically search and it doesn't automatically send an error report (although it comes awfully close with a simple "submit quick error report" that requires no forms to fill out).