can not make mxj work……

Jun 25, 2010 at 1:53pm

can not make mxj work……

I have java issue;
I try to use mxj msa fluid for instance, or jitter.balls from efe (http://cycling74.com/forums/topic.php?id=27170 )…
But everytime the same answer from my dear friend max:

• error: java.lang.UnsupportedClassVersionError: Bad version number in .class file
• error: at java.lang.ClassLoader.defineClass1(Native Method)
• error: at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
• error: at com.cycling74.max.MXJClassLoaderImpl.doLoadClass(MXJClassLoaderImpl.java:119)
• error: at com.cycling74.max.MXJClassLoader.loadClazz(MXJClassLoader.java:88)
• error: Could not load class ‘Ball’

Although I put the class in the classes folder… maybie my java file is not at the same place… 
I am on Leopard 10.5…
Any suggestions ?
Thx.

#51055
Jun 26, 2010 at 1:16pm

Hello Ad.
some questions:
have you installed the developer tools on your mac?
which version of java do you have?, you can check that information by opening your terminal and typing:
java -version
are you using any IDE like eclipse to compile your classes?
can you load any of the classes available on max?

Emmanuel

#183185
Jun 28, 2010 at 9:06am

Hello efe;
Yes I have installed Xcode 3.1.
java version: “1.5.0_19″
I compile my classes with javac.

Yes I can load classes in max (now…).
Weird point anyway: When I type “mxj now”, it doesn’t work… But when I open the now helpfile, the mxj is correctly loaded…here’s maybie one clue of that issue…
Thx for your concern (is that English ? :) )
Ad

#183186
Jun 28, 2010 at 5:40pm

Emmanuel, are you compiling with java 6? Cause that’s what that error would indicate to me.

#183187
Jun 28, 2010 at 10:51pm

Yeah, 6
1.6.0_20

#183188
Jun 29, 2010 at 11:51am

Yep, update works for balls ! Thx.
Although I still have a problem with msa fluid.

here’s my terminal compilation:
javac -classpath /Applications/Max5/Cycling ’74/java/lib/MSAFluid.jar fluid_simulation.java

Is this correct ?

Sorry for this non-interesting issue, I’m really beginner in this field

ad

#183189
Jun 29, 2010 at 2:32pm

hello Ad.
If you are planning to add more than one jar you will need multiple paths. Herewith a small example. You should type on the terminal in order to compile this small(rather useless) class:
javac -classpath /Applications/Max5/Cycling ’74/java/lib/max.jar:/Applications/Max5/Cycling ’74/java/lib/jitter.jar Windows.java

Notice that they are separated by : and I am including both max and jitter files.
In your case I guess you will need to add the MSAFluid.jar and then compile.

However, I would suggest you to use the terminal just for small tests and move to a proper IDE in order to make bigger projects; that is much easier and allows binding multiple jars and inherit from classes. I use Eclipse but I am sure it is possible to develop mxj projects with XCode(they removed, somehow, the java templates) and NetBeans

Let me know how it goes

Emmanuel

Attachments:
  1. windows.zip
#183190
Jul 1, 2010 at 6:33am

Thx Efe.
No problem for your window js.

I’ll try to compile my fluid issue in Eclipse.
Which is sure is that I have several errors in my fluid simulation java file…

I have to make Mark Dexter a friend. I’ll tell you about that, it ‘s going to take me a little bit time!
Ad.

#183191

You must be logged in to reply to this topic.