Streams of thought by...

This is the (tumble) log by Innerfusion, I'll post various things about code, design, politics, or whatever is interesting at the moment.

7/14/2010
2:06pm
Comments (View)

Building CSS3 PIE for OSX

CSS 3 PIE is a really cool idea and I wanted to start using it, but I ran into some issues building it yesterday. When attempting to build it, here’s what I ran into:

  # assuming you're in the root of the PIE directory
  PIE:master> ant
  
  Buildfile: build.xml

  build-uncompressed:

  build-compressed:
       [exec] Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
       [exec]   at java.lang.ClassLoader.defineClass1(Native Method)
       [exec]   at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
       [exec]   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
       [exec]   at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
       [exec]   at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
       [exec]   at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
       [exec]   at java.security.AccessController.doPrivileged(Native Method)
       [exec]   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
       [exec]   at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
       [exec]   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
       [exec]   at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
       [exec]   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)
       [exec] Result: 1
     [delete] Deleting: /Users/vann/Downloads/PIE/build/script_uncompressed.js

  build:

  BUILD SUCCESSFUL
  Total time: 0 second

Luckily the developer working on it responded and stated that Java 6 is required for Google’s Closure Compiler function to work, which in turn is what Ant needs to compile the .htc files. He pointed me to the following post (which I won’t re-write here): http://www.deliciouscoding.com/post.cfm?entry=change-default-leopard-java-jdk-1-5-to-1-6-the-easy-way , (Note: I’m thinking that this only applies to OSX 10.5.8 with multiple versions of JDK installed). After updating JDK to 6.0 and attempting to run ant again, I ran into the following issue again:

    Error: JAVA_HOME is not defined correctly.
    We cannot execute /System/Library/Frameworks/JavaVM.framework/Home/bin/bin/java

Easy fix, just open up ~/.bash_login and add this:

    export JAVA_HOME='/System/Library/Frameworks/JavaVM.framework/Home'

And then reload your shell:

    . ~/.bash_login

Run ant again and you should be fine, here’s the thread on github.

Posted in: css web development issues