Friday, May 14, 2010
Tomcat Window Service
Thursday, May 13, 2010
Why is Java limited to 1.5MB process size on Win XP?
In general, the reason is
“The reason we need a contiguous memory region for the heap is that we have a bunch of side data structures that are indexed by (scaled) offsets from the start of the heap. For example, we track object reference updates with a "card mark array" that has one byte for each 512 bytes of heap. When we store a reference in the heap we have to mark the corresponding byte in the card mark array. We right shift the destination address of the store and use that to index the card mark array. Fun addressing arithmetic games you can't do in Java that you get to (have to :-) play in C++.
Usually we don't have trouble getting modest contiguous regions (up to about 1.5GB on Windohs, up to about 3.8GB on Solaris. YMMV.). On Windohs, the problem is mostly that there are some libraries that get loaded before the JVM starts up that break up the address space. Using the /3GB switch won't rebase those libraries, so they are still a problem for us.
We know how to make chunked heaps, but there would be some overhead to using them. We have more requests for faster storage management than we do for larger heaps in the 32-bit JVM. If you really want large heaps, switch to the 64-bit JVM. We still need contiguous memory, but it's much easier to get in a 64-bit address space.”
http://stackoverflow.com/questions/171205/java-maximum-memory-on-windows-xp
Restore MBR for XP and Remove Ubuntu
This works for removing Ubuntu OS from a dual boot system.
In general, you have to restore your MBR and reformat your Ubuntu partition
To restore your MBR:
1. Insert the Windows Setup CD into the CD or DVD tray on your computer.
2. Restart your computer.
3. Hit Enter to reboot from the Windows CD when prompted to do so.
4. Type “R” and hit Enter in Windows Setup to enter the Recovery
Console. The Recovery Console will appear and list the Windows OSs
on your machine.
5. Select the number corresponding to the Windows installation you
wish to boot into. For most people this will be a “1”. (In some
versions of the Recovery Console the installations will be
numbered. In others, you will have to deduce the installation
number from the order of priority in the list.)
6. Windows will prompt you for an Administrator password.
Try your Administrator password or, if your Administrator password does not
work, hit Enter.
7. At the Windows prompt, type “fixmbr”.
8. Type “exit” to restart the computer.
Wednesday, May 5, 2010
IllegalMonitorStateException
Monday, May 3, 2010
TreeSet, TreeMap and Comparator
PuTTY - Keeping session alive
If you have some VPN tunnels that timeout based on activity, you could try the following setting if you are using PuTTY 1) Open PuTTY and...

-
In Linux environment, if you want to use command base to capture network packets, you can use the following command with TCPDUMP tcpdump ...
-
This is a MP4 file format notes that reference from ISO IEC 14496-12 2005 edition about Information technology — Coding of audio-visual obje...
-
Problem I encountered the following exception when I tried to start up Hive Exception in thread "main" java.lang.IllegalArg...
