creating mxj object from processing library
I’m running a node.js server and have a java library that connects to this server through processing. From there I pass information to max/msp through the max.link library in processing. I would like to take processing out of the equation so I thought to use the java library from processing in an mxj object.
The problem I’m having right now is getting all of the correct java files organized in my file path and compiling them correctly. I have two java classes that rely on each other but after compiling each class I am unable to instantiate the mxj object.
Here is the import section of my code which when I try to instantiate the mxj object I get an error: cannot find constructor. When I compile with the ‘package com.itpredial.tinyphone.client;’ I get an error
java.lang.NoClassDefFoundError: TinyphoneClient (wrong name: com/itpredial/tinyphone/client/TinyphoneClient)
what am I doing wrong here? All of the java files are in the cycling74/classes directory and i have a TinyPhone.jar file in the cycling74/lib directory. What is the difference between import and package? Im not super savvy with java.
Thanks for all of the help!
It´s not really possible to give any "diagnosis" and i have no experience with processing so far.
probably something going wrong with with instantiation of classes… try using the full name names instead of short one like
new com.itpredial.tinyphone.client.TinyphoneEvent() intead of
— don’t know if you ever instantiate this particular class… just anx example for the sytax–
What is the difference between import and package? Im not super savvy with java.
in short :
a package is an organized collection of different classes that usually form an application together (or a library)
the import statement declares which classes/packages you will use inside your code that are not of the same package as your class.
Forums > Java