How can I find out what is in a Lookup?

The simplest way is to call Lookup.toString(). If you want the output in a more readable form, do the following and print/format the resulting collection as you wish:

Collection<?> c = theLookup.lookupAll(Object.class);
for (Object o : c) {
  //do what you want

Do not do either of these things in production code!

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo