Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Ants will not launch, OSX 10.4.7

Help
h.m.
2006-09-24
2013-04-15
  • h.m.
    h.m.
    2006-09-24

    starting ANtsP2P fails. console log shows:

    [JavaAppLauncher Warning] Specifying a specific version for JVMVersion 1.3.1 is deprecated.  Use the more general 1.3* instead.

    Unable to locate the application's 'main' class. The class 'ants.p2p.gui.FrameAnt' must be public and have a 'public static void main(String[])' method. (LAX)

    Unable to Launch Java Application: Unable to locate the application's 'main' class. The class 'ants.p2p.gui.FrameAnt' must be public and have a 'public static void main(String[])' method. (LAX)

    (see also other posts)

    terminal window commands show:
    $ java -version
    java version "1.5.0_06"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-112)
    Java HotSpot(TM) Client VM (build 1.5.0_06-64, mixed mode, sharing)

    $ cd /Applications/ANtsP2P/ANtsP2P.app/Contents/MacOS/
    $ java ANtsP2P
    Exception in thread "main" java.lang.NoClassDefFoundError: ANtsP2P

    renaming ANtsP2P to ANtsP2P.class would resolve that issue running the class from within that directory, but that generates the following error:
    $ java ANtsP2P      
    Exception in thread "main" java.lang.ClassFormatError: Incompatible magic value -17958194 in class file ANtsP2P
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
            at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

    I finally got it to work, but only by executing the following:
    $ cd /Applications/ANtsP2P/
    $ java -jar AntsP2P.jar

    that got it runninig, but it should be easier, no? I suspect has to do with multiple java versions and the osx way of doing things, and ANtsP2P not supporting it... I don't want to clean out all my hava for this, other applications work perfectly, limewire and such.