import Java.util.*;
import javax.naming.*;
import javax.naming.Directory.*;
import java.io.*;
public class ListAll {
public static void main(java.lang.String[] args) {
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL, "t3://localhost:7001");
try {
InitialContext ctx = new InitialContext(env);
NamingEnumeration enum = ctx.listBindings("");
while(enum.hasMore()) {
Binding binding = (Binding) enum.next();
Object obj = (Object) binding.getObject();
System.out.println(obj);
}
} catch (NamingException e) {
System.out.println(e);
}