Forums > Java

Java classes won't reload

February 26, 2010 | 3:13 pm

I’m having an awful lot of trouble with Java classes not reloading. I edit my code. I put post() statements in the constructor. I compile the code. I edit my "mxj myClassname" box. The constructor doesn’t run. The java object doesn’t update to the new version.

If I quit max altogether, it does load the new, correct, version of the max java object.

I have done this over and over again to check that I haven’t missed a step. So, I’m completely stumped.

This is on my personal laptop, which has been working fine for a long while.

Any hints as to what might be wrong?


February 26, 2010 | 4:23 pm

You’re not doing anything wrong. Once you have compiled the class you need to recreate the object in order to reload the class.


February 26, 2010 | 4:33 pm

But, I am recreating the object. I go into edit mode. I edit the name by inserting a space and then deleting it again. The new class does not reload. It used to, but has stopped doing it recently.

I’m wiping Max 5.0.4 off my machine and upgrading to 5.1 to see if that fixes it. I don’t have anything important on that machine in terms of Java code, so will just wipe everything.


February 26, 2010 | 6:38 pm

I can’t edit my post for some reason. Removing and reinstalling Max solved the problem.


August 5, 2011 | 1:14 pm

My Java classes do not reload when recompiled. I do delete/undo but it does not help. I only have one mxj loaded for testing. If I restart MAX it loads the new version. How can this be fixed please?


August 5, 2011 | 8:44 pm

I had this problem too. I found you need to send a "zap" message to the mxj object to make it reload on the next delete/undo. But for testing I just put the line:

zap();

in my constructor(s). Not sure that this is the ‘proper’ way of doing things but it works for me (on windows XP).


August 6, 2011 | 12:37 am

Thanks. I have tried the zap message before posting and thought I had no luck. Shall try in the constructor.


Viewing 7 posts - 1 through 7 (of 7 total)