XML Feeds

.

[java-dev] dynamically loading java classes in a standalone

Brad Garton garton at columbia.edu
Thu Feb 21 20:00:32 MST 2008


This is what I think is happening, because the memory increase I see  
is about how large the un-jarred classes are.

I think my confusion came from the dynamic classpath entry in the  
max.java.config.txt file making it work ok in the java/classes/ dir  
in the MaxMSP application hierarchy.

brad


On Feb 21, 2008, at 5:50 PM, topher lafata wrote:

> one more question.
>
> how large are all of those classes before you jar them up?
>
> it is very possible that the jar is being unzipped when the mxj  
> classloader falls back on trying to locate the class in the max  
> search path. as a matter of fact it is entirely possible that all  
> jars in the max search path are being unzipped temporarily into  
> memory ,including max.jar, since the classloader needs to crack  
> open any jar file it finds in the search path to check if it  
> contains the class it is looking for.
>
> This previous point would explain the memory blowup you are seeing.  
> As mentioned before, the long time it takes for instantiation would  
> be due to the fact that the whole max search path is being scanned  
> for each class you are loading since your jar is not in the system  
> or dynamic classpath and the classloader is falling back to its  
> last resort scheme for classloading.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.cycling74.com/pipermail/java-dev/attachments/20080221/1f1b52d0/attachment.htm


More information about the java-dev mailing list