4/25/2007

Java HotSpot VM Options

Java HotSpot VM Options


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:+

4/06/2007

Google Gulp!

Quench your thirst for knowledge.






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.

Google Gulp FaQ!

Unique Package Name...?

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!

Threadophobia

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."

ShiFter

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 * 4
can be done like this:
4839534 << 2

or

543894 / 2
can 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

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:







System.out.println(org.theshoemakers.which4j.Which4J.which( java.lang.String.class ) );


And here is the output:


jar:file:/D:/jdk1.4.1_03/jre/lib/rt.jar!/java/lang/String.class

Download which4J

4/01/2007

404 - Error Page...

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).

Tired of seeing that 500 Bad gateway error while deploying a Springboot application in AWS...?

By default, Spring Boot applications will listen on port 8080. Elastic Beanstalk assumes that the application will listen on port 5000. Th...