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
ReplDriver lets us provide a custom class loader to be used.
findClass is the main entry point for defining a custom classloader, so I started by checking to see if I could intercept the REPL's call to this method to ensure my classloader was deployed.
Using the below code as a system classloader lets me know that findClass was called; I'd need to get to this point with a class loader developed for the REPL.
I can't produce this behavior if I add a similar class loader for the ReplDriver. There were no error messages.
//Only purpose of this is to display a messageclassCustomClassLoader(parent: ClassLoader) extendsClassLoader(parent)://support for running in IntelliJ IDEAfinaldefappendToClassPathForInstrumentation(path: String):Unit= {}
overridedeffindClass(name: String):Class[_] =
println(s"findClass of CustomClassLoader called")
throwClassNotFoundException(s"$name")
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey there,
ReplDriver
lets us provide a custom class loader to be used.findClass
is the main entry point for defining a custom classloader, so I started by checking to see if I could intercept the REPL's call to this method to ensure my classloader was deployed.Using the below code as a system classloader lets me know that
findClass
was called; I'd need to get to this point with a class loader developed for the REPL.I can't produce this behavior if I add a similar class loader for the
ReplDriver
. There were no error messages.How should I start fixing this?
Beta Was this translation helpful? Give feedback.
All reactions