fork download
  1. class Ideone implements Runnable {
  2.  
  3.  
  4. public static void main(String[] args) {
  5. new Thread(new Ideone()).run();
  6. }
  7.  
  8. public void run() {
  9. try {
  10. Thread t = new Thread(new Ideone());
  11. t.start();
  12. t.join();
  13. } catch (InterruptedException ex) {
  14. System.out.println("won't see me");
  15. }
  16. }
  17.  
  18. }
Success #stdin #stdout #stderr 0.05s 2577408KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Exception in thread "Thread-6" java.lang.OutOfMemoryError: unable to create new native thread
	at java.lang.Thread.start0(Native Method)
	at java.lang.Thread.start(Thread.java:714)
	at Ideone.run(Main.java:11)
	at java.lang.Thread.run(Thread.java:745)