Java Performance Tuning

Java(TM) - see bottom of page

|home |services |training |newsletter |tuning tips |tool reports |articles |resources |about us |site map |contact us |
Tools: | GC log analysers| Multi-tenancy tools| Books| SizeOf| Thread analysers| Heap dump analysers|

Our valued sponsors who help make this site possible
JProfiler: Get rid of your performance problems and memory leaks! 

Training online: Concurrency, Threading, GC, Advanced Java and more ... 

Javva The Hutt September 2004

JProfiler
Get rid of your performance problems and memory leaks!

Modern Garbage Collection Tuning
Shows tuning flow chart for GC tuning


Java Performance Training Courses
COURSES AVAILABLE NOW. We can provide training courses to handle all your Java performance needs

Java Performance Tuning, 2nd ed
The classic and most comprehensive book on tuning Java

Java Performance Tuning Newsletter
Your source of Java performance news. Subscribe now!
Enter email:


Training online
Threading Essentials course


JProfiler
Get rid of your performance problems and memory leaks!


Back to newsletter 046 contents | All Javva's articles

The Early Days

"One early e-commerce site stored the shopping cart contents, including price, in hidden form fields, enabling a relatively simple exploit that allowed any HTML- and HTTP-savvy user to buy any item for $0.01" (Brian Goetz)

Ah, the early days of the commercial web. Such naivety. Such simplicity. So much stupidity.

Diary of a Hutt

August. This month, I thought I'd share with you some of the correspondence I have had with my readers.

Dear Mr. Hutt, Assist me. I started my program using 'java Hello World' but I get 'Exception in thread "main" java.lang.NoClassDefFoundError: Hello'. This is a production application which I must tune immediately. --Questor

Dear Questor, your problem is unusual. Your tuning has been so successful that your application is running too fast for the JVM to see the class. It scans the disk for the class, but by the time it finds it, it is already on to the next one and misses the first. You need to slow down the JVM enough that it will see the class, and the NoClassDefFoundError will go away. The best way to do this is to increase the sound volume on the computer to maximum, and play some white noise sound files or Tangerine Dream if you can't get the pure stuff. This is known to slow down the JVM. Do not mute the volume, that negates the slowdown effects. Keep trying until it works. Good luck. --Javva The Hutt

Dear Mr. The Hutt, You clearly have a lot of knowledge about tuning Java programs, please could you help me? I was told that there is a "go faster" button distributed with the Java SDK, but I cannot find it. --Mr. Enquirer

Dear Mr. Enquirer, there certainly is, but we performance experts like to keep it secret because if everyone knew about it, we'd be out of jobs. --Javva The Hutt

Dear Mr. The Hutt, Please could you tell me how to find the button, I promise I'll keep it a secret and not tell anyone how to find it. --Mr. Enquirer

Dear Mr. Enquirer, The button is highly secret, but I do tell one person each year, and I've decided this year that it can be you. The trick is that the code for the button is written in the same color as the background. But that is just one of the tricks keeping it a secret. There is a special hidden file in the java.lang package called Secret.java. It doesn't come in the sources, it is actually contained in the JRE jar file. The only way to see it is to open the JRE jar file and delete all the java.lang classes. Then you have to run the java executable, and it will generate the file. In order to fool unsuspecting people who might do this seqeunce of events accidentally, the JVM prints the following if it has successfully printed the Secret.java file:

"Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object"

The file should now be in the os system directory as a "hidden" file. Find it, open it, change the foreground color to one that is different from the background color, then compile it. Now you have access to the go faster button. Keep this secret please. --Javva The Hutt

Dear Mr. The Hutt, I followed your instructions, and everything worked as you say, but I couldn't find the Secret.java file anywhere on my system. Could you tell me where it is? Also, my java doesn't seem to work anymore. --Mr. Enquirer

Dear Mr. Enquirer, I'm afraid I don't know what you are talking about, I don't know anything about a Secret.java file. Are you confusing me with another correspondent? I have not received any previous email from you. --Javva The Hutt

Javva The Hutt.


Back to newsletter 046 contents


Last Updated: 2024-12-27
Copyright © 2000-2024 Fasterj.com. All Rights Reserved.
All trademarks and registered trademarks appearing on JavaPerformanceTuning.com are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. JavaPerformanceTuning.com is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
URL: http://www.JavaPerformanceTuning.com/news/javvathehutt046.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us