problems with mxj~ to include in standalone

Danny de Graan's icon

Hi There,

I have some problems with the mxj~ object to include it in a standalone.

When I build the standalone and run it, it will give me the following message in the max window of the standalone:

(mxj) Unable to resolve path of max.jar!mjx is rendered powerless.
•error: Unable to create JVM

I tried to include the classes and java files in the build but no luck.

After this I tried to open de standalone and place the apropiate files in the support folder but no luck there either.

Does anyone have an idea how to resolve this problem?

Im on a macbook pro running 10.4.11 and the latest maxmsp-jitter.

Thanx

Owen Green's icon

Hi,

I think you need to put max.jar into

/Contents/support/java/lib/

--
Owen

danny de graan wrote:
> Hi There,
>
> I have some problems with the mxj~ object to include it in a
> standalone.
>
> When I build the standalone and run it, it will give me the following
> message in the max window of the standalone:
>
> (mxj) Unable to resolve path of max.jar!mjx is rendered powerless.
> •error: Unable to create JVM
>
> I tried to include the classes and java files in the build but no
> luck.
>
> After this I tried to open de standalone and place the apropiate
> files in the support folder but no luck there either.
>
> Does anyone have an idea how to resolve this problem?
>
> Im on a macbook pro running 10.4.11 and the latest maxmsp-jitter.
>
>

Danny de Graan's icon

Hi Owen,

I thought I did but will try it again. Thanx for replying.

Danny de Graan's icon

Hi Owen,

I tried it again but no luck. Any ideas?

Owen Green's icon

Hi Danny,

Have you verified that it's there by checking in the finder? (contextual
menu > show package contents)

--
Owen

danny de graan wrote:
> Hi Owen,
>
> I tried it again but no luck. Any ideas?
>
>
>
> --
> - Danny -
>

Emmanuel Jourdan's icon

On 15 avr. 08, at 13:47, Owen Green wrote:
> Hi,
>
> I think you need to put max.jar into
>
> /Contents/support/java/lib/

Did you copy max.java.config.txt too?

ej

Danny de Graan's icon

Hi Owen,

Yes, but I place them there manually by copying them and create a folder in the support folder.

If I build the app I also tried to include the files but no luck there either.

The story gets even worse because now when I load the patch into maxmsp I get a whole bunch of errors. This morning there were no problems.

This is the error report:

• error: java.lang.OutOfMemoryError
• error:     at java.util.zip.ZipFile.open(Native Method)
• error:     at java.util.zip.ZipFile.(ZipFile.java:203)
• error:     at java.util.zip.ZipFile.(ZipFile.java:234)
• error:     at com.cycling74.max.MXJClassLoaderImpl.loadJarData(MXJClassLoaderImpl.java:432)
• error:     at com.cycling74.max.MXJClassLoaderImpl.look_for_class_recursive(MXJClassLoaderImpl.java:273)
• error:     at com.cycling74.max.MXJClassLoaderImpl.look_for_class_recursive(MXJClassLoaderImpl.java:290)
• error:     at com.cycling74.max.MXJClassLoaderImpl.look_for_class_recursive(MXJClassLoaderImpl.java:290)
• error:     at com.cycling74.max.MXJClassLoaderImpl.lookupClassData(MXJClassLoaderImpl.java:176)
• error:     at com.cycling74.max.MXJClassLoaderImpl.doLoadClass(MXJClassLoaderImpl.java:111)
• error:     at com.cycling74.max.MXJClassLoader.loadClazz(MXJClassLoader.java:88)
• error: Could not load class 'envfollow'

Danny de Graan's icon

Hi ej,

No, I didn't. Where do I need to place this? And how do I place it?

I did it manually but don't know if this the correct way.

Emmanuel Jourdan's icon

On 15 avr. 08, at 20:04, danny de graan wrote:

> Hi ej,
>
> No, I didn't. Where do I need to place this? And how do I place it?
>
> I did it manually but don't know if this the correct way.

Copy the all C74:/java folder inside your myApp.app/Contents/support/.
This should work.

ej

Danny de Graan's icon

Hi EJ,

I found the file and I think I understand what is going on.

The error I posted 2 posts ago happened because I had a [standalone] and a [onecopy] in the patch. It gave me that strange error...no idea why. However, I removed the files and now everything works again.

I wil now look into max.java.config.txt file.

Danny de Graan's icon

Hi ej,

Do I need to configure the max.java.config.txt file or leave it like it is?

Danny de Graan's icon

Hi ej,

It works! Thanx a million.

The only thing I didn't do is place a [standalone] in the patch while I was building. Will experiment with it a little but now it works well.

Thanx again.

django's icon

Hi fellow Maxers,

I try to build a standalone with Max 6 (Windows 7) and get the same error as mentioned above:

(mxj) Unable to resolve path of max.jar!mjx is rendered powerless.
•error: Unable to create JVM

I tried copying the Cycling'74/Max6.0/Cycling'74/java folder in the standalone support folder, but without success.

Does anyone know how to solve this?

Cheers!

Brecht's icon

It would be nice to hear what you did and how you made it work; I have this issue with max 5 on mac, but all the threads I read about it say the same thing: copy to the content/support/java folder, to no avail...

I wish when people say 'it works now' they actually post the fix or answer; I thought that was part of basic forum etiquette.

TSt's icon

und ich schließe mich ebenfalls dieser Problematik an und: bitte keine Ausflüchte sondern vernünftige Lösungsansätze es ist schon genug Zeit vertan worden!

of course rtfm, google and other search_topics here in the forum I tried these, but no positive results

but now this issue: actually under xp home sp3, Max ver.6.0.8 installed is:
java version "1.7.0_13"
Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
Java HotSpot(TM) Client VM (build 23.7-b01, mixed mode, sharing)

(also the newer ver. shows the same mistakes!) if I want open e.g. several mxj mxj~ tutorial-patches (we don't read at this time about the self developed mxj mxj~ which works well under MaxMsp ver.4.6.3)

Max window alerts:(mxj) unable to find max.jar! mxj is rendered powerless in its absence
unable to create JVM

in the attachment: mxjpreferences.xml, max.java.config.txt from this Max ver. 6.0.8

thanks for help and solutions

5193.mxjpreferences.xml
xml
pm's icon

I have the same problem here. Building an app containing java worked with Max 5, but not now with Max 6.1.
Even if I tried putting C74 java folder inside the app, it still gives me this :
(mxj) Unable to resolve path of max.jar! mxj is rendered powerless.
Unable to create JVM

Any help is welcome.

slx's icon

Hi,

I have the same problem. I followed the solution from Emmanuel Jourdan but had no luck. I try to build a standalone with max 6.0.8 n mac 10.6.8. and want to include a java class file (mxj object).

Does anyone knows a solution?

best,
slx

slx's icon

Oh, I think I solved it. Before building open the inspector of the standalone object and check the box of the setting called "Make Application Subfolder Search Path". Then after building the app do what Emmanuel said -> copy the java folder (put e.g. your java class file into the class folder inside the java folder) from Applications/Max6/Cycling '74 to myApp.app/Contents/support/.

Best,
slx

keepsound's icon

Hi, I have a issue with the same commands on Max 32 or 64bit (max 6.1.8 on a Win8 PC)
Some commands in 32bit mode, are working as usual, some not (see and try to launch SnippingTool.exe)

All the commands, instead, in Max 64Bit are working well

And that occours using shellAcces or DOSHack, in the same way.

Any idea?

Max Patch
Copy patch and select New From Clipboard in Max.

here the example:

thomaspeters's icon

Persons who are still having this problem in 2016, or later, here is how I fixed it:

Create a [standalone] object, and in its inspector, under "all", enable "Make Application Subfolder Search Path". This is not connected to anything, it's just there.

Export as usual to standalone application.

Copy the ENTIRE "java" folder from Cycling '74/Max 6.1/Cycling '74/ into the standalone folder, right there at the level where the executable is.

Done.

ndivuyo's icon

I have tried all these methods and it is not working for me. However, I am creating a m4l device and not a standalone, also I'm running Max 7. I add all these files in my Project directory for max for live (where you put all the subpatchers and js files, etc.) But the frozen device still can't find my mxj objesct classes, and when freezing I get "Unable to add max-mxj".

Any suggestions?