XML Feeds

.

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

topher lafata topher at topher.com
Thu Feb 21 13:44:42 MST 2008


I don't really understand what you mean by saying that your entire  
jar is being loaded at startup. If you have any mxj instances in your  
standalone patch they should only load the classes that they have  
dependencies on. I am not aware of a way to get the JVM to force load  
a bunch of arbitrary classes.It loads any class when it needs it with  
the exception of the bootstrap classes.

Regardless. I am not totally sure but if you include  
max.java.config.txt it is possible that mxj will find it. You might  
want to mess around with this.
In the case that it does find it you will need to mess around with  
paths for the max.dynamic.jar.dir, max.dynamic.class.dir etc since  
they will need to be
relative and I am not sure what they would be relative to.

Sorry I can't be more helpful.

t

On Feb 21, 2008, at 10:51 AM, Brad Garton wrote:

> Hey gang --
>
> I'm building some standalones (Max 4.6.3, OSX 10.4.11, 2 GHz Intel  
> MacBook), and I can get things to work by putting the max.jar file  
> in "my.app/Contents/support/java/lib/".  Now I have a large jar  
> file, and I put it in "my.app/Contents/support/java/classes/".  The  
> problem is that the standalone is treating the jar file as a system  
> jar and loading the entire thing into memory at start-up.  I want  
> to add the jar to the dynamic classpath so that it will only load  
> the classes I need from the jar.
>
> I do this when running MaxMSP by setting the  
> "max.dynamic.class.dir" in the "max.java.config.txt" to point to  
> the large jar file.  How can I set the dynamic classpath in a  
> standalone?
>
> thanks!
>
> brad
>
> _______________________________________________
> java-dev mailing list
> java-dev at cycling74.com
> http://www.cycling74.com/mailman/listinfo/java-dev



More information about the java-dev mailing list