You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we can't remove "import java.lang.Thread" because user is required to access java Thread.
if change jruby-complete-9.1.15.0.jar to jruby-complete-1.7.3.jar, it works well.
Console output
#<Thread:0x6b95c03e>
============================
uri:classloader:/jruby/java/core_ext/object.rb:95: warning: already initialized constant Thread
4
============================
NoMethodError: undefined method `current' for Java::JavaLang::Thread:Class
Did you mean? currentThread
method_missing at org/jruby/RubyBasicObject.java:1657
<main> at <script>:2
Exception in thread "main" org.jruby.embed.EvalFailedException: (NoMethodError) undefined method `current' for Java::JavaLang::Thread:Class
Did you mean? currentThread
at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:131)
at org.jruby.embed.ScriptingContainer.runUnit(ScriptingContainer.java:1307)
at org.jruby.embed.ScriptingContainer.runScriptlet(ScriptingContainer.java:1300)
at com.TestThread.main(TestThread.java:22)
Caused by: org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `current' for Java::JavaLang::Thread:Class
Did you mean? currentThread
at org.jruby.RubyBasicObject.method_missing(org/jruby/RubyBasicObject.java:1657)
at RUBY.<main>(<script>:2)
you should just use the qualified classname: java.lang.Thread.getAllStackTraces().size().to_s or alias the java Thread class with JThread = java.lang.Thread and use JThread where needed.
we can't remove "import java.lang.Thread" because user is required to access java Thread.
if change jruby-complete-9.1.15.0.jar to jruby-complete-1.7.3.jar, it works well.
Console output
Expected output
Environment
jruby-complete-9.1.15.0.jar
The text was updated successfully, but these errors were encountered: