+3  A: 

Have you looked at this resource? It states that you should be able run thread-limit to find the maximum number of threads and can tweak it by compiling glibc.

plinth
Strangely enough, thread-limit was able to create 1528 threads before failing. Hmm.
ColinD
A: 

This is with Ubuntu Linux (1GB RAM)

dsm@localhost:~$ javac ThreadTest.java 
dsm@localhost:~$ java ThreadTest 
8113
dsm@localhost:~$ java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
dsm@localhost:~$
dsm
A: 

Can you try it with the JRockit JVM? IIRC, it had a different threading model than the stock Sun JVM.

Tim Howland
+3  A: 

Updating the kernel to a newer version (2.6.something) with NPTL threading fixed this.

ColinD