Just as a quick note, JSS and the JAVA
package too won't allow you to treat
LispObject
s objects as JavaObject
s for the purposes of JFIELD
and
JSS:GET-JAVA-FIELD
. But if you still want to access internal fields and
implementation details (the usual warnings apply!), try the following:
(jss:get-java-field (jss:new 'JavaObject (car (threads:mapcar-threads #'identity))) "javaThread" T)
This was because I was looking for an answer to a question on #abcl
, but even
then, wrapping the "Lisp" object in a JavaObject
manually helps achieve the
requested goal of retrieving the Java Thread
object.
The T
at the end is necessary here because the field is actually
package-private - but that's to be expected if you want to access internals
without an (official) API.