Installation problem - Mac OS X

Help
2008-06-01
2013-04-08
  • Hi all,

    first of all, thanks for your great job. I think that it is very useful.

    I tried to install the OpenCCG distribution by following the README instructions but I have an error message (see below).
    I am using a MacBook wth MacOSX 10.5

    Thanks in advance for any help.

    Alessandro

    ++++++++++++
    alessandro-mazzeis-macbook:tiny mazzei$ tccg
    Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
        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:316)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
    alessandro-mazzeis-macbook:tiny mazzei$ echo $PATH
    /opt/local/bin:/opt/local/sbin:/Users/mazzei/tmp/OCCG/openccg/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
    alessandro-mazzeis-macbook:tiny mazzei$ echo $JAVA_HOME
    /Library/Java/Home
    alessandro-mazzeis-macbook:tiny mazzei$ echo $OPENCCG_HOME
    /Users/mazzei/tmp/OCCG/openccg
    alessandro-mazzeis-macbook:tiny mazzei$ pwd
    /Users/mazzei/tmp/OCCG/openccg/grammars/tiny
    alessandro-mazzeis-macbook:tiny mazzei$
    java version "1.5.0_13"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
    Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)
    ++++++++++

     
    • Hi.

      I resolved the problem by building the OpenCCG from source. It seems to work now.

      Thanks for your work on OpenCCG

      Alessandro

       
  • Raveesh
    Raveesh
    2009-09-17

    Yes! I also resolved it the same way!

     
  • Michael White
    Michael White
    2009-09-17

    I believe this is a Java 1.5 vs. 1.6 issue.  Glad to hear that recompilation solves the issue!

     
  • kappolo
    kappolo
    2009-12-04

    I built the system with
    "ant"
    i did
    export OPENCGG_HOME="/Users/kappolo/Downloads/openccg/"
    export PATH="$PATH:$OPENCCG_HOME/bin"
    but now when I'm executing the command on the directory I get:
    andrea-biaggis-macbook-pro-4:tiny kappolo$ tccg
    -bash: tccg: command not found

     
  • Raveesh
    Raveesh
    2009-12-04

    execute /Users/kappolo/Downloads/openccg/bin/tccg  XYZ
    on the prompt, where XYZ is your grammar.xml file (with absolute path)
    what do you get? If it works then tccg is there and working, all you have to ensure is you "export" the env variables properly!

    thanks,
    Raveesh

     
  • Michael White
    Michael White
    2009-12-06

    Note that you should build from source using the ccg-build command, not invoking ant directly.  I've just updated the README in the latest cvs version accordingly.

    Also note that OPENCCG_HOME needs to be spelled exactly as shown, with the underscore and with CCG not CGG.