h5bp/ant-build-script — Issue #9: Java exception during js.minify
Author: farneman
Created: 2012-02-04 20:13:44+00:00
State: open

While running the build script I'm getting the following error:

-js.all.minify:
[echo] Minifying scripts
[copy] Copying 2 files to /Users/Josh/Server/lee-drugs/intermediate/js
[apply] Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
[apply]	at java.lang.ClassLoader.defineClass1(Native Method)
[apply]	at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
[apply]	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
[apply]	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
[apply]	at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
[apply]	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
[apply]	at java.security.AccessController.doPrivileged(Native Method)
[apply]	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[apply]	at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
[apply]	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
[apply]	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
[apply]	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)
[apply] Result: 1
[apply] Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
[apply]	at java.lang.ClassLoader.defineClass1(Native Method)
[apply]	at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
[apply]	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
[apply]	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
[apply]	at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
[apply]	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
[apply]	at java.security.AccessController.doPrivileged(Native Method)
[apply]	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[apply]	at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
[apply]	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
[apply]	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
[apply]	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)
[apply] Result: 1
[apply] Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
[apply]	at java.lang.ClassLoader.d
[apply] efineClass1(Native Method)
[apply]	at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
[apply]	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
[apply]	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
[apply]	at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
[apply]	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
[apply]	at java.security.AccessController.doPrivileged(Native Method)
[apply]	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[apply]	at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
[apply]	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
[apply]	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
[apply]	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)
[apply] Result: 1

Which results in the build failing during -.js.scripts.concat.

I'm guessing this means theirs an issue with some aprt of the script trying to use a version of Java that I don't have. Any ideas?

I'm running the build script on an older PowerPC Mac running 10.5, so that may be the problem.