Running JRuby's test suite via ant may result in a NoClassDefFoundError:
$ ant -v run-junit-precompiled
...
[junit] junit.framework.TestListener: startTest(test_respond_to)
[junit] Exception in thread "RubyThread-777: test/test_respond_to_generated_test.rb:4" java.lang.NoClassDefFoundError: org/jruby/runtime/ThreadContext
$ java -server -Xcomp -cp lib/jruby.jar -Djruby.home=$PWD org.jruby.Main test/test_respond_to.rb
LoadError: load error: builtin/java/java.net -- java.lang.NoClassDefFoundError: org/jruby/runtime/ThreadContext
require at org/jruby/RubyKernel.java:961
(root) at /export/twisti/jruby/lib/ruby/site_ruby/shared/builtin/javasupport.rb:44
process_args at /export/twisti/jruby/lib/ruby/site_ruby/shared/builtin/javasupport.rb:90
run at /export/twisti/jruby/lib/ruby/1.8/test/unit/autorunner.rb:11
(root) at /export/twisti/jruby/lib/ruby/1.8/test/unit.rb:279
call at org/jruby/RubyProc.java:269
call at org/jruby/RubyProc.java:223
$ java -server -Xcomp -Xbootclasspath/a:lib/jruby.jar -Djruby.home=$PWD org.jruby.Main test/test_respond_to.rb
Loaded suite test/test_respond_to
Started
...
Finished in 6.367 seconds.
3 tests, 4 assertions, 0 failures, 0 errors