Mac export does not work (because of netP5?)


#1

My exported Mac app does not start. I don’t have a Mac but got the feedback below from a betatester. Windows and Android exports work fine. Any idea what the problem might be? User says he installed Apple Java 6.

[JavaAppLauncher] Requested [1.5*], launching in [1.6] instead.
[JavaAppLauncher Error] CallStaticVoidMethod() threw an exception
Exception in thread “main” java.lang.NoClassDefFoundError: netP5/NetListener
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at apple.launcher.LaunchRunner.loadMainMethod(LaunchRunner.java:56)
at apple.launcher.LaunchRunner.run(LaunchRunner.java:112)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:51)
at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
Caused by: java.lang.ClassNotFoundException: netP5.NetListener
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
… 6 more

This is my Listener in setup():

// create listener for TcpClient; will receive NetMessages which contain the data. NetListener is an interface and requires to implement netEvent and netStatus. 

Listener = new NetListener()
{
    public void netEvent(NetMessage m) 
    {
        if (Client != null)
        {
            ClientIO = m.getString();
            
            if (ClientIO != null)
            {
                ProcessReport(ClientIO);
            } 
        }
    }
    
    public void netStatus(NetStatus s)
    {
        ;
    }
};

My app uses netP5 for TCP/IP (part of oscP5 distributution). In other words, there is an “import netP5.*;” in the code. I use netP5 because it works with Processing for Android. I build the Android and Windows executables with Processing 3 but have to use Processing 2.0.3 to get the Mac version.