I need to retrieve value of a final static string in an interface. I don't know the interface name till run time. I cannot load the interface because no class implements the interface. Would you give me some suggestion? Thanks
Make visible what, without you, might perhaps never have been seen. - Robert Bresson
Helmut Lerch
Ranch Hand
Joined: Feb 11, 2001
Posts: 48
posted
0
Hi,
Originally posted by Joey Tran: I need to retrieve value of a final static string in an interface. I don't know the interface name till run time. I cannot load the interface because no class implements the interface. Would you give me some suggestion? Thanks
I suppose the following code: <pre> public interface Inter { public static String str = "String"; } public class JustMain { public static void main(String args[]) { //retrieving the String System.out.println(Inter.str); System.exit(0); } } </pre> If I supposed wrong forget everything . Heli
[This message has been edited by Helmut Lerch (edited October 04, 2001).]
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.