Wiki source code of Programming__WebObjects-Web Applications-Development-Common Pitfalls and Troubleshooting
Version 4.1 by smmccraw on 2007/07/08 09:45
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | == Debugging Classpath Problems == | ||
2 | |||
3 | === Chuck Hill === | ||
4 | |||
5 | I recently found this useful and thought others might too: | ||
6 | |||
7 | {{panel}} | ||
8 | |||
9 | System.out.println("\nClassPath Follows....\n"); | ||
10 | ClassLoader classLoader = ClassLoader.getSystemClassLoader(); | ||
11 | URL[] urls = ((URLClassLoader)classLoader).getURLs(); | ||
12 | for(int i=0; i<urls.length; i++) | ||
13 | { | ||
14 | System.out.println(urls[i].toString() + "\n"); | ||
15 | } | ||
16 | |||
17 | {{/panel}} | ||
18 | |||
19 | Add this to public static void main(String argv[[]]) before the call to WOApplication.main(argv, Application.class) and add these imports: | ||
20 | |||
21 | {{panel}} | ||
22 | |||
23 | import java.io.*; | ||
24 | import java.net.*; | ||
25 | |||
26 | {{/panel}} | ||
27 | |||
28 | Category:WebObjects |