-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for reloading class files when changed (hot swapping) #48
Comments
That is unfortunately not allowed by Java - mainly because you'd have multiple versions of the same class floating around causing chaos since there is no way to force all objects of a given class to de-allocate (due to dependencies etc.). There is a hack if you split your classes into interfaces since it's ok to load additional implementations of the same interface which is pretty much the only way you can do this in Java, but that means you have to re-factor your code accordingly. See also |
Is there a way to tear down the whole jvm and start anew? |
No, there is no de-initialization, because there is no way to clear out all possible references of R objects - see #25 |
FWIW rJava 1.0 supports hierarchy of class loaders, so it is now possible to create a new loader for each version of the class. This is natively supported by |
During development classes tend to change quite often. Currently rJava seems to load a class definition only once. I have to restart R in order to test a new version of a Java class.
Is there a way to make rJava "reload" a class definition somehow? I experimented with a custom class loader but with no avail.
The text was updated successfully, but these errors were encountered: