Runtime error. java.lang.NoClassDefFoundError: java/util/functions/Predicate
Aleksey Shipilev
aleksey.shipilev at oracle.com
Wed Oct 10 11:07:08 PDT 2012
Are you sure you're running with the same JDK you were building with?
This seems weird if you had compiled successfully, and then failed in
the run time with NCDFE.
-Aleksey.
On 10/10/2012 10:02 PM, José Luis Garbi wrote:
> Hello everyone,
>
> I'm new to Project Lambda and I'm giving it a try.
> I installed 1.8.0-ea-b59 (Win 64 bits)
> When compiling; I get no errors.
> When executing; I get an error: Exception in thread "main"
> java.lang.NoClassDefFoundError: java/util/functions/Predicate
>
> Could you please give me some advice? (sorry if it's too basic)
>
> *The class definition*
>
> import java.util.ArrayList;
> import java.util.List;
>
> public class ProjectLambdaMain {
> public static void main(String... args) {
> List<Character> lc = new ArrayList<Character>();
> lc.add('a');
> lc.add('b');
> lc.add('d');
> lc.add('1');
> lc.add('2');
> Iterable<Character> filteredCharList = lc.filter(c ->
> Character.isAlphabetic(c));
> }
> }
>
> *The error*
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> java/util/functions/Predicate
> at java.lang.Class.getDeclaredMethods0(Native Method)
> at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
> at java.lang.Class.getMethod0(Unknown Source)
> at java.lang.Class.getMethod(Unknown Source)
> at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
> at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
> Caused by: java.lang.ClassNotFoundException: java.util.functions.Predicate
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> ... 6 more
>
>
> Thanks in advance,
> José.-
>
More information about the lambda-dev
mailing list