0

I try to get a processing PApplet to be initialized from Max. I can create the Applet but i can't get it to run. I can create a java Frame so my guess is that a PApplet should be possible.

Here is what i have know:

public class PAppletInMax extends MaxObject {

    public static class Test {

        Test() {
            // this is to have a message in Max console
            post("construct Test");

            // create the Processing sketch
            MaxTest_01 mt_01 = new MaxTest_01();
            // call main
            // here is where it goes wrong
            //mt_01.main(new String[]{});

            // this crashes max
            //mt_01.runSketch(new String[]{}, mt_01);
            //PApplet.runSketch(new String[]{}, mt_01);
        }


    }


    public PAppletInMax() {

        /*
        // this works
        JFrame frame = new JFrame("FrameDemo");
        frame.pack();
        frame.setVisible(true);
         */
        Test t = new Test();

    }


}

It would be really nice if someone could help. Cause once it works it's so much easier cause OSC won't be needed anymore for communication.

clankill3r
  • 9,146
  • 20
  • 70
  • 126
  • First off: OOOoooooooo this looks exciting. Second: don't post duplicates (you posted this an hour before http://stackoverflow.com/questions/24442103/papplet-not-appearing) – jesses.co.tt Jun 27 '14 at 14:47
  • Maybe you need to access the internal Frame of the PApplet ? I also know that Frame isn't imported by default as of v2+ anymore though... – jesses.co.tt Jun 27 '14 at 14:48
  • I'm in a hurry that's hence the duplicate, and it's not really a duplicate, the code in the other one is totally different. I'm a bit further now. I can get a processing window for example. But i can't get OpenGl to work. I keep getting `java.lang.NoClassDefFoundError: ` and I did so many attempts on `max.dynamic.jar.dir` and `max.dynamic.class.dir` but no luck. I'm getting a bit sick of it. – clankill3r Jun 27 '14 at 19:00
  • Fair enough, on closer look I see that they are not duplicates... sorry about that. – jesses.co.tt Jun 28 '14 at 20:26
  • Have you asked a new question about the OpenGL embed ? – jesses.co.tt Jun 28 '14 at 20:27
  • I asked on the max forum, http://cycling74.com/forums/topic/java-lang-noclassdeffounderror-javaxmediaopenglglexception but no luck yet. – clankill3r Jun 28 '14 at 22:47

0 Answers0