Forums > Java

Java 5, Tiger and mxj

January 22, 2006 | 8:22 pm

I wrote some mxj classes using some Java 5 features. I was developing under Windows, and I did not have to change a thing in MAX/MSP in order to immediately use those classes.

However, with the Mac things were different. First, I had to upgrade from Panther to Tiger to even get a 1.5 JVM update. Then, although the JVM installed correctly, and I went into Java Preferences and set it as the default JVM for Apps and Applets, I was still seeing version 1.4.2 when I went into Terminal and typed "java -version", and MAX/MSP was giving me all sorts of ClassLoader-related errors.

So I did some Web searching and found a link (http://jmesnil.net/weblog/2005/05/02/using-java-15-on-mac-o s-x-tiger/) with specific instructions to get the Mac to use 1.5 as a default. This appeared to work insofar as the Mac Default installation is concerned – "java -version" now reports 1.5, but MAX/MSP is choking on the HellowWorld1.mxt sample path, with error messages saying "could not load bundle" and "Unable to create JVM". I also changed the entry in mxjpreferences.xml to point to 1.5.0, but with the same results.

I’m now kind of regretting my use of 1.5 features, but it would be a major pain to go backwards. Can anyone tell me how to get mxj to use Java 1.5 under Tiger?


January 22, 2006 | 8:53 pm

On 22 Jan 2006, at 20:22, Warren Sirota wrote:

> I’m now kind of regretting my use of 1.5 features, but it would be
> a major pain to go backwards. Can anyone tell me how to get mxj to
> use Java 1.5 under Tiger?

Easy: put

max.java.jvm.version 1.5

into your max.java.config.txt. That’s it – everything else should
work fine. (I’ve been using Java 1.5 under MXJ for several months
without any problems.)

mxjpreferences is only for the MXJ Java text editor, I believe (and I
don’t use this – I use Eclipse). I don’t know much about what it
means to tell the Mac to use Java 1.5 by default; it may only relate
to browser applets.

I really have no idea why OS X didn’t move to Java 1.5 as default
ages ago.

nick rothwell — composition, systems, performance — http://
http://www.cassiel.com


January 22, 2006 | 9:28 pm

Thank you, that’s much better. Whew.

Best wishes,
Warren Sirota


January 23, 2006 | 5:41 am

Moving this thread to the java-dev forum…


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