Reload java extension
Reload java extension
I have a problem when reloading my java extensions. If I compile the file and click reload in the admin interface, it still reloads the old class. I have to restart sfs to run the new class. Is that related to my jvm or the sfs?
Lapo, same here.
The same problem apply to the Zone extension written in AS.
SFS doesn't react neighter to the Reload Zone nor to the Reload Extension button pressed for a zone extension.
It works only after a server restart.
The same problem apply to the Zone extension written in AS.
SFS doesn't react neighter to the Reload Zone nor to the Reload Extension button pressed for a zone extension.
It works only after a server restart.
function onJoin(usr) {if (usr.getName() == "Lapo") trace ("All Hail Lapo");}
one moment... Reloading AS extensions has always been working 
If you can't reload an extension, probably a compilation error is being thrown. Check your console, or the wrapper logs if you run it as a service.
Probably the Java extension issue noticed by radz is similar, I will do a test soon and I'll let you know
If you can't reload an extension, probably a compilation error is being thrown. Check your console, or the wrapper logs if you run it as a service.
Probably the Java extension issue noticed by radz is similar, I will do a test soon and I'll let you know
Radz you're right. The problem is with the Java default classloader which does not load newly compiled classes.radz wrote:I have no problem reloading AS extensions.I don't get any error messages when reloading java extension either, it's looks fine except it's reloading the old version of the class.
Thanks for spotting this!
I am already working on it
-
turtlesoup
- Posts: 77
- Joined: 28 Dec 2007, 20:56
The solution is actually in the above previous message of mine:
Service/Daemon:
open the Server/conf/wrapper.conf and remove the classpath line referencing the folder
Standalone:
open the start.sh (Unix) or start.bat (Windows) and remove the classpath entry
Additionally you can turn on the <AutoReloadExtension> feature to make the server auto-detect extension saves.
Depending on how you run the service (service/daemon) or standalone you should remove the reference to that folder in the classpath folder.I think there's a little mistake in the 1.4.0 launcher. It includes the javaExtensions/ folder in the classpath.
Service/Daemon:
open the Server/conf/wrapper.conf and remove the classpath line referencing the folder
Standalone:
open the start.sh (Unix) or start.bat (Windows) and remove the classpath entry
Additionally you can turn on the <AutoReloadExtension> feature to make the server auto-detect extension saves.