Still problems with search path in 4.6.1 (Mac) for Application created with MaxMsp

Sep 15, 2006 at 9:46am

Still problems with search path in 4.6.1 (Mac) for Application created with MaxMsp

Hello,

There still are search path problems in 4.6.1 on Mac (not tested on Win).

All applications with MaxMsp are searching outside the application bundle for different files.

Very easy test :

1)create a patch with [mxj help] and [standalone] inside.
2)create an application from it.
3)copy the app in a folder
4)copy mxj.jar in the sasme folder (not inside the application bundle)
5)launch the app, you see that the application has taken the max.jar from outside the application :

Stalwook:/tmp kristof$ ls -d /tmp/bug-path-mxj.app /tmp/max.jar
/tmp/bug-path-mxj.app /tmp/max.jar

then, in max status window :

MXJ System CLASSPATH:
/private/tmp/max.jar
MXJClassloader CLASSPATH:
/private/classes/
(mxj classloader) dynamic classpath entry /private/classes/ does not exist.
• error: Could not load class ‘help’

This is a very annoying problem, because when you put your application in /Applications folder, then it may take 5 minutes to start (it will scan everything looking for its files).

Best regards
Chris

#27642
Sep 20, 2006 at 5:51am

Chris wrote:
> All applications with MaxMsp are searching outside the application
> bundle for different files.

This isn’t too bad

> Very easy test :
>
> Could not load class ‘help’

Max.jar does not contain the classes. you should copy the whole Java
folder into the application bundle/contents/ folder

> This is a very annoying problem, because when you put your
> application in /Applications folder, then it may take 5 minutes to
> start (it will scan everything looking for its files).

This is only the case if you do not deliver the files it looks for.

Sometimes you want files outside the application to be found. Imagine
someone creates a sampler. Then you would just put the appliction into a
folder and ask the user to place the samples and the preset files there….

Max stops searching if it found what its looking for, so its your
responsability to deliver it early enough…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#83787
Sep 20, 2006 at 6:04pm

Hi,

>> Could not load class ‘help’
>
> Max.jar does not contain the classes. you should copy the whole Java
> folder into the application bundle/contents/ folder
>
>> This is a very annoying problem, because when you put your
>> application in /Applications folder, then it may take 5 minutes to
>> start (it will scan everything looking for its files).
>
> This is only the case if you do not deliver the files it looks for.

In my apps, I ‘m putting all Jar, … in Content/MacOS

so maybe this is the reason why it is looking outside?
should I put all my stuff in the same folder than the mxf ?

>
> Sometimes you want files outside the application to be found. Imagine
> someone creates a sampler. Then you would just put the appliction into a
> folder and ask the user to place the samples and the preset files there….

> Max stops searching if it found what its looking for, so its your
> responsability to deliver it early enough…
>
> Stefan
>

regards,
Chris

#83788
Sep 21, 2006 at 8:02am

Chris wrote:
> so maybe this is the reason why it is looking outside?
> should I put all my stuff in the same folder than the mxf ?

I leave the test up to you, this is typically something to find out by
trial and error… (and by searching the archives…)
Then if it works, read the docs again, and you’ll understand.

I am not an expert for building applications but it took me a minute to
get it running (thanks to your detailed steps to reproduce).
90% of answers I give I don’t know in advance, I try, and find out…

Then if there remains a problem (which is possible) come back to ask…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#83789

You must be logged in to reply to this topic.